Commit Graph

8884 Commits

Author SHA1 Message Date
Jean Boussier 2fbe5d7f29
Merge pull request #43711 from Shopify/thread-accessor-isolated-state
Use IsolatedExecutionState in `thread_mattr_accessor`
2021-11-24 23:01:10 +01:00
Jean Boussier b9098f6ec4
Merge pull request #43712 from Shopify/as-cache-error-handling
Report Memcached and Redis cache errors to Rails.error
2021-11-24 23:00:57 +01:00
Kevin McPhillips ac751edab3
Allow a fallback value to be returned from Rails.error.handle 2021-11-24 11:19:00 -05:00
Jean Boussier c63da2005e Report Memcached and Redis cache errors to Rails.error
Ref: https://github.com/rails/rails/issues/43472

We swallow these exceptions because it makes sense for a cache to
fallback to a cache miss in case of transcient failures.

However there's value in reporting these to the application
owners so that they can be alerted that something undesirable happened.
2021-11-24 12:25:03 +01:00
Jean Boussier 2bf5974287 Use IsolatedExecutionState in `thread_mattr_accessor`
Ref: https://github.com/rails/rails/pull/43596

This allow users to declare wether their unit of work is isolated
by fibers or by threads.
2021-11-24 11:41:16 +01:00
Espartaco Palma 36c5e7f7ab
ActiveSupport::Cache, fix race conditions on test/cache - part IV 2021-11-23 15:23:41 -08:00
Rafael Mendonça França c496ae8441
Merge pull request #43693 from esparta/fix_race_conditions_test_cache_iii
ActiveSupport::Cache - fix more race conditions on test/cache - part III
2021-11-23 15:33:34 -05:00
Jean Boussier 359240dff6 Use native Class#subclasses if available
Followup: https://github.com/rails/rails/pull/43548
Ref: https://github.com/ruby/ruby/pull/5045

That feature was accepted by Matz and should make it to Ruby 3.1.

We use feature testing just in case it wouldn't and also to better
support alternative implementations.
2021-11-23 09:32:28 +01:00
Espartaco Palma f57d1111de
ActiveSupport, fix more race conditions on test/cache - part III 2021-11-22 15:32:59 -08:00
Benoit Daloze 302b966375 Improve check for GC.stat(:total_allocated_objects)
* This works whether the Ruby implementation raises or uses a Hash with
  a default of 0 to represent unknown keys (like TruffleRuby) and so
  this is more portable.
* Also avoids an extra exception on JRuby.
2021-11-22 14:51:43 +01:00
Jean Boussier b4eae47bbe Eliminate internal uses of `PerThreadRegistry` and deprecate it
This module has been soft deprecated for a long time, but since
it was used internally it wasn't throwing deprecation warnings.

Now we can throw a deprecation warning.
2021-11-22 09:53:16 +01:00
Jean Boussier ce3a73abe7
Merge pull request #43671 from Shopify/as-use-isolated-state
Use `IsolatedExecutionState` across Active Support
2021-11-22 09:50:46 +01:00
willnet 11601dafaa
[ci skip]Add a missing double quote on code comments 2021-11-22 10:39:20 +09:00
Rafael Mendonça França f47204802a
Merge pull request #43675 from esparta/fix_race_conditions_test_cache_ii
ActiveSupport, fix more race conditions on test/cache - part II
2021-11-19 16:21:41 -07:00
Rafael Mendonça França fd0ec3f4f6
Remove deprecate `ActiveSupport::Multibyte::Unicode.default_normalization_form` 2021-11-19 23:15:57 +00:00
Espartaco Palma efed47e8b6
ActiveSupport, fix more race conditions on test/cache - part II 2021-11-19 14:59:16 -08:00
Rafael Mendonça França 59eb7edb68
Remove deprecated support to use `Range#include?` to check the inclusion of a value in a date time range is deprecated 2021-11-19 21:43:24 +00:00
Rafael Mendonça França 93c35945cf
Remove deprecated `URI.parser` 2021-11-19 21:43:23 +00:00
Rafael Mendonça França 82313145df
Remove deprecated `config.active_support.use_sha1_digests` 2021-11-19 21:43:22 +00:00
Jean Boussier 5a985451f9
Merge pull request #43625 from Shopify/error-reporting-api
Rails standardized error reporting interface
2021-11-19 16:29:29 +01:00
Jean Boussier 0ea374c81f Use `IsolatedExecutionState` across Active Support
Ref: https://github.com/rails/rails/pull/43596

This allow users to declare wether their unit of work is isolated by
fibers or by threads.

`PerThreadRegistry` and `thread_mattr_accessor` were intentionally left
out as they require documentation change. I'll submit them in separate
pull requests.
2021-11-19 09:58:15 +01:00
Espartaco Palma 71d8483826
Fix some race conditions on ActiveSupport cache test 2021-11-18 12:59:04 -08:00
Jean Boussier 192a652cb6
Merge pull request #43596 from Shopify/active-support-local-store
Introduce `ActiveSupport::IsolatedExecutionState` for internal use
2021-11-18 15:55:36 +01:00
Jean Boussier 540d2f41f6 Introduce ActiveSupport::IsolatedExecutionState for internal use
Many places in Active Support and Rails in general use `Thread.current#[]`
to store "request (or job) local data". This often cause problems with
`Enumerator` because it runs in a different fiber.

On the other hand, some places migrated to `Thread#thread_variable_get`
which cause issues with fiber based servers (`falcon`).

Based on this, I believe the isolation level should be an application
configuration.

For backward compatibility it could ship with `:fiber` isolation as a default
but longer term :thread would make more sense as it would work fine for
all deployment targets except falcon.

Ref: https://github.com/rails/rails/pull/38905
Ref: https://github.com/rails/rails/pull/39428
Ref: https://github.com/rails/rails/pull/34495
(and possibly many others)
2021-11-18 15:55:15 +01:00
Rafael Mendonça França d4ad739454
Remove deprecated `Rails.config.action_view.raise_on_missing_translations` 2021-11-17 21:51:16 +00:00
Jean Boussier 8cbc19d86b Rails standardized error reporting interface
Fix: https://github.com/rails/rails/issues/43472

The reporter is held by the executor, but the `Rails` module provides a
nicer `Rails.error` shortcut.

For ease of use, two block based specialized methods are exposed.

`handle`, which swallow errors and forward them to the subscribers:

```ruby
Rails.error.handle do
  1 + '1' # raises TypeError
end
1 + 1 # This will be executed
```

`record`, which forward the errors to the subscribes but let it
continue rewinding the call stack:

```ruby
Rails.error.record do
  1 + '1' # raises TypeError
end
1 + 1 # This won't be executed.
```

For cases where the blocked based API isn't suitable, the lower level
`report` method can be used:

```ruby
Rails.error.report(error, handled: true / false)
```
2021-11-16 13:34:53 +01:00
Rafael Mendonça França 4e06e83736
Merge pull request #43652 from esparta/remove_warnings_test_cache_stores
ActiveSupport: Remove warnings on test/cache/stores
2021-11-15 15:38:50 -07:00
Espartaco Palma 5606c35697
Remove warnings on AS/test/cache/stores
Since the test are skipped when Redis | Memcache are not reacheable two
instance variables are not initialized properly but used on teardown
blocks, having warnings about undeclared variables:

- instance variable @cache not initialized (redis cache store)
- instance variable @_stores not initialized (memcache store)
2021-11-15 14:27:03 -08:00
Rafael Mendonça França a134eebea5
Invert conditional
This avoid a method call and also is easier to read.
2021-11-15 22:19:38 +00:00
Sean Doyle 8dc27b59c5 Support `Object#with_options` without a block
When the block argument is omitted, the decorated Object instance is returned:

```ruby
 # app/helpers/my_styled_helpers.rb
 module MyStyledHelpers
   def styled
     with_options style: "color: red;"
   end
 end

 # styled.link_to "I'm red", "/"
 # #=> <a href="/" style="color: red;">I'm red</a>

 # styled.button_tag "I'm red too!"
 # #=> <button style="color: red;">I'm red too!</button>
```
2021-11-15 17:00:36 -05:00
Rafael Mendonça França 1fde031e89 Fix gemspec 2021-11-15 21:06:21 +00:00
Rafael Mendonça França 9195b7fd0a
Require MFA to release rails 2021-11-15 20:37:42 +00:00
Nikita Vasilevsky 2a00c89a7d
Enable Lint/DuplicateMethods rubocop rule 2021-11-15 13:51:28 -05:00
Jean Boussier 1b0dca131b Improve compatibility with `date` versions `3.2.1`, `3.1.2`, `3.0.2` and `2.0.1`
Historically `Date._iso8601(nil)` returns `{}`.

But in these versions it raises a `TypeError` changing the exception type
of `ActiveSupport::TimeZone#iso8601(nil)`, which may break some applications.
2021-11-15 12:04:55 +01:00
Jean Boussier 6bad959565 Extract ActiveSupport::ExecutionContext out of ActiveRecord::QueryLogs
I'm working on a standardized error reporting interface
(https://github.com/rails/rails/issues/43472) and it has the same need
for a `context` than Active Record's query logs.

Just like query logs, when reporting an error you want to know what the
current controller or job is, etc.

So by extracting it we can allow both API to use the same store.
2021-11-10 09:36:02 +01:00
Jean Boussier acd462fc23 Only wrap subscriber exceptions if there is more than one
Ref: https://github.com/rails/rails/pull/43282
Ref: https://github.com/rails/rails/pull/43561

It can be legitimate for subscriber to want to bubble up some exception
to the caller, so wrapping it change the exception class which might break
the calling code expecting a specific error.

We can minimize this by only using InstrumentationSubscriberError
when more than one subscriber raised.
2021-11-02 16:47:37 +01:00
Jean Boussier bf33510d86 Optimize CurrentAttributes method generation
The bulk of the optimization is to generate code rather than use
`define_method` with a closure.

```
Warming up --------------------------------------
            original   207.468k i/100ms
      code-generator   340.849k i/100ms
Calculating -------------------------------------
            original      2.127M (± 1.1%) i/s -     10.788M in   5.073860s
      code-generator      3.426M (± 0.9%) i/s -     17.383M in   5.073965s

Comparison:
      code-generator:  3426241.0 i/s
            original:  2126539.2 i/s - 1.61x  (± 0.00) slower
```

```ruby

require 'benchmark/ips'
require 'active_support/all'

class Original < ActiveSupport::CurrentAttributes
  attribute :foo
end

class CodeGen < ActiveSupport::CurrentAttributes
  class << self
    def attribute(*names)
      ActiveSupport::CodeGenerator.batch(generated_attribute_methods, __FILE__, __LINE__) do |owner|
        names.each do |name|
          owner.define_cached_method(name, namespace: :current_attributes) do |batch|
            batch <<
              "def #{name}" <<
              "attributes[:#{name}]" <<
              "end"
          end
          owner.define_cached_method("#{name}=", namespace: :current_attributes) do |batch|
            batch <<
              "def #{name}=(value)" <<
              "attributes[:#{name}] = value" <<
              "end"
          end
        end
      end

      ActiveSupport::CodeGenerator.batch(singleton_class, __FILE__, __LINE__) do |owner|
        names.each do |name|
          owner.define_cached_method(name, namespace: :current_attributes_delegation) do |batch|
            batch <<
              "def #{name}" <<
              "instance.#{name}" <<
              "end"
          end
          owner.define_cached_method("#{name}=", namespace: :current_attributes_delegation) do |batch|
            batch <<
              "def #{name}=(value)" <<
              "instance.#{name} = value" <<
              "end"
          end
        end
      end
    end
  end
  attribute :foo
end

Benchmark.ips do |x|
  x.report('original') { Original.foo }
  x.report('code-generator') { CodeGen.foo }
  x.compare!
end
```
2021-11-02 15:52:25 +01:00
Rafael Mendonça França 33ca392317
Avoid adding new method to `ActiveSupport`.
We don't need this delegation and can be setting directly to the right
object.

Also document the new configuration.
2021-11-02 01:12:32 +00:00
Ryuta Kamizono 96df650d9e
Merge pull request #43552 from Thornolf/inflector_underscore_regression_after_optimization
Fix (Inflector::Methods#underscore): small regression
2021-10-29 17:59:42 +09:00
Ryuta Kamizono 479e4c19a2 Fix markup in activesupport/CHANGELOG.md
[ci-skip]
2021-10-29 17:20:38 +09:00
Jean Boussier 7b5096947e Call Executor#wrap around each test
It's `Rails.application.executor.wrap` that is responsible for
clearing request/job local state such as `CurrentAttributes`.

Instead of including an ad hoc helper to clear `CurrentAttributes` it's
better to run the executor so we properly clear other states as well.

However it means all executor hooks now need to be re-entrant.
2021-10-28 15:18:29 +02:00
Jean Boussier ffae3bd8d6 Refactor DescendantsTracker to leverage native Class#descendants on Ruby 3.1 2021-10-28 10:46:42 +02:00
Jean Boussier d2734111dd
Revert "Call Executor#wrap around each test" 2021-10-28 00:35:07 +02:00
Quentin "Thornolf" Baudet 86faeb8386
Fix (Inflector::Methods#underscore): small regression 2021-10-28 00:25:09 +02:00
Jean Boussier d8936b755d Use the native `Class#descendants` if available
Ruby 3.1 is very likely to ship with a native implementation
of `Class#descendants` that doesn't need to iterate over
ObjectSpace. So we should use it if available.

Ref: https://bugs.ruby-lang.org/issues/14394
Ref: https://github.com/ruby/ruby/pull/4974
2021-10-27 14:53:45 +02:00
Jean Boussier 265c1e9f2d Call Executor#wrap around each test
It's `Rails.application.executor.wrap` that is responsible for
clearing request/job local state such as `CurrentAttributes`.

Instead of including an ad hoc helper to clear `CurrentAttributes` it's
better to run the executor so we properly clear other states as well.
2021-10-27 12:46:22 +02:00
Jean Boussier b3df08355a Skip RedisCacheStore test if no Redis server is running
MemCacheStore tests have been doing the same for a while.

As an extra safety, if `ENV["CI"]` is set, we always run
the tests.
2021-10-27 10:10:30 +02:00
Jean Boussier fe4ead7fc6 Ruby 3.1: decorate Process._fork if available
Ref: https://bugs.ruby-lang.org/issues/17795

This new API makes it much easier to correctly
intercept forks.
2021-10-25 15:29:12 +02:00
Erich Soares Machado cdf537ad0a
Addresses `Digest::UUID` RFC 4122 compatibility.
Updates the `Digest::UUID.uuid_from_hash` to return the correct UUID values
for namespace IDs that are different from the ones provided on `Digest::UUID`.

- The new behavior will be enabled by setting the
  `config.active_support.use_rfc4122_namespaced_uuids` option to `true`
  and is the default for new apps.

- The old behavior is the default for upgraded apps and will output a
  deprecation warning every time a value that is different than one of
  the constants defined on the `Digest::UUID` extension is used as the
  namespace ID.

Fixes #37681.
2021-10-23 10:16:16 -04:00
Jean Boussier 9636b4da36 Feature test GC.stat(:total_allocated_objects) rather than check for JRuby 2021-10-21 10:07:00 +02:00
Jean Boussier 81d0dc90be Use Process.clock_gettime unit argument to save some floating point multiplications 2021-10-21 10:05:32 +02:00
Jean Boussier 7ddfa93ba5 Stop using `Concurrent.monotonic_time`
Unless you are on a Ruby older than 2.3 (or some very old JRuby)
`Concurrent.monotonic_time` is just `Process.clock_gettime(Process::CLOCK_MONOTONIC)`.
So might as well skip the extra method call, and more importantly
it allows in many cases to pass the scale as second argument and save some
floating point multiplication.
2021-10-21 09:31:25 +02:00
Rafael Mendonça França 6a1ee787a0
Disable Dalli compression on the protocal level
We were disabling in the write level but since Dalli 3 the protocol
is compressing by default and ignoring the option at write level.
2021-10-14 17:49:49 +00:00
Yasuo Honda 370ef3d5b6 Use `Dalli::Protocol::Binary` instead of deprecated `Dalli::Server`
This commit addresses these failures with Dalli 3.0.1, which loses Dalli 2.x support.

```ruby
$ bin/test test/cache/stores/mem_cache_store_test.rb -n test_fetch_read_failure_returns_nil
Run options: -n test_fetch_read_failure_returns_nil --seed 2554

F

Failure:
OptimizedMemCacheStoreTest#test_fetch_read_failure_returns_nil [/home/yahonda/src/github.com/rails/rails/activesupport/test/cache/behaviors/failure_safety_behavior.rb:8]:
Expected "bar" to be nil.

bin/test test/cache/behaviors/failure_safety_behavior.rb:4

F

Failure:
MemCacheStoreTest#test_fetch_read_failure_returns_nil [/home/yahonda/src/github.com/rails/rails/activesupport/test/cache/behaviors/failure_safety_behavior.rb:8]:
Expected "bar" to be nil.

bin/test test/cache/behaviors/failure_safety_behavior.rb:4

Finished in 0.010229s, 195.5206 runs/s, 195.5206 assertions/s.
2 runs, 2 assertions, 2 failures, 0 errors, 0 skips
$
```
2021-10-14 17:49:44 +00:00
Yasuo Honda 2f8db2db0e Use `Dalli::Protocol::Binary` to address deprecataion warning
```ruby
Dalli::Server is deprecated, use Dalli::Protocol::Binary instead
```

Refer https://github.com/petergoldstein/dalli/pull/760
2021-10-14 17:49:37 +00:00
Rafael Mendonça França 28bc4f87fd
Extract common behavior of html safe translation to a module
This module will be a private module in Active Support, this way
if we need to change the behavior of translate in controllers or
views don't forget to change in the other one.
2021-10-12 18:03:46 +00:00
Alex Ghiculescu 616f302d66 Be more explicit about lack of inheritance on `thread_mattr_accessor`
Co-authored-by: Petrik de Heus <petrik@deheus.net>
2021-10-12 15:49:30 +02:00
Rafael Mendonça França 5e1a039a1d
Merge pull request #43282 from theojulienne/guard-against-instrumentation-exceptions
Guard against subscriber exceptions in ActiveSupport::Notifications
2021-10-08 13:23:37 -04:00
John Hawthorn 3c9a76dd4f
Merge pull request #43382 from jhawthorn/notification_match_cleanup
Simplify ActiveSupport::Notification matching
2021-10-06 10:10:05 -07:00
Daniel Colson ccb3cb573b
Replace ableist language
The word "Crazy" has long been associated with mental illness. While
there may be other dictionary definitions, it's difficult for some of us
to separate the word from the stigmatization, gaslighting, and bullying
that often comes along with it.

This commit replaces instances of the word with various alternatives. I
find most of these more focused and descriptive than what we had before.
2021-10-05 22:27:09 -04:00
John Hawthorn 3c1bec407c Move AllMessages behaviour into Matcher
This avoids needing to delegate all methods to the actual subscriber
class and we can deal just with the message name matching behaviour.
2021-10-05 14:43:28 -07:00
John Hawthorn daa78a6d9e Remove "matches?" from AS::N subscriber classes
This was not being used anymore
2021-10-05 14:43:11 -07:00
Theo Julienne 8f76cca3d9 Ensure we guard against all exceptions, not just StandardError 2021-10-04 23:07:50 +00:00
Jonathan Hefner 414e8dea59
Merge pull request #43334 from federicoaldunate/add-that-raises-exception-message-encryptor
Update MessageEncryptor guide to show that an exception is raised [ci-skip]
2021-09-29 12:15:59 -05:00
Federico Aldunate 4860d8534b Update MessageEncryptor guide to show that an exception is raised
swap order
2021-09-29 14:06:58 -03:00
Étienne Barrié 5bf6073614 Revert "Fix ForkTracker on ruby <= 2.5.3"
This reverts commit 332a2909d4.
2021-09-24 13:02:05 +02:00
Étienne Barrié d63add1039 Don't override Object#fork in Ruby 3.0
It's no longer necessary with https://bugs.ruby-lang.org/issues/9573
2021-09-24 13:01:55 +02:00
Theo Julienne 8afcbb6f21 Guard against subscriber exceptions in ActiveSupport::Notifications 2021-09-22 02:07:45 +00:00
Rafael Mendonça França a76344ffc5
Merge PR #42475 2021-09-20 18:03:57 -04:00
Rafael Mendonça França d177551c30
Preparing for 7.0.0.alpha2 release 2021-09-15 18:22:51 -04:00
Rafael Mendonça França 9b7be48212
Preparing for 7.0.0.alpha1 release 2021-09-15 17:55:08 -04:00
Jean Boussier c91c266872 Enable `Style/ExplicitBlockArgument` cop
This reduce the stack size which is beneficial for
exceptions performance.

See: https://gist.github.com/byroot/cb3bcadcc3701c2518d002fb8d3a4e7a

However the cop is unsafe because it might change the block arity,
so it can run into some false positives.
2021-09-05 17:06:19 +02:00
Jean Boussier 5fbc750840 Get rid of `mattr_accessor` in `ActiveSupport::Dependencies`
Since the module isn't included anywhere and is purely static
there iss no point using `mattr_accessor`, which define instance
accessors and other extra overhead.

Regular `attr_accessor` does the job just fine.
2021-09-05 12:42:23 +02:00
Xavier Noria 1d6355f6e1 Move Zeitwerk to railties
Active Support should not know about Rails. Once classic has been removed,
AS should get anything it needs from the application as usual.
2021-09-05 03:37:46 +02:00
Xavier Noria 5346dfdf74 Move the default autoloaders inflector to railties 2021-09-04 20:44:39 +02:00
Xavier Noria e0d77f124d Formatting 2021-09-04 09:32:04 +02:00
Xavier Noria d9fc52cc7b Update the AS CHANGELOG 2021-09-04 09:30:08 +02:00
Xavier Noria 556572ac19 Fixes typo 2021-09-04 07:56:57 +02:00
Xavier Noria 7ce6f45ae3 Revise private docs of AS::Dependencies 2021-09-02 19:41:21 +02:00
Xavier Noria 174ee7bb60 Depends on Zeitwerk 2.5.0.beta3 2021-09-01 15:31:04 +02:00
Jean Boussier a3cfa4a20d
Merge pull request #43098 from flavorjones/flavorjones-number-to-currency-detect-parse-failures
Fix number_to_currency regression in handling "-0.0"
2021-08-26 15:45:13 +02:00
Mike Dalessio 81175fb98a
Fix number_to_currency regression in handling "-0.0"
simplifying the method along the way.

This regressed in #42581 and is related to prior work in #39350 and #37865.
2021-08-25 22:30:12 -04:00
Mike Dalessio 900ce92c9d
Avoid use of exceptions to detect invalid floats
Use Kernel::Float(..., exceptions:false) instead of a rescue block in
ActionView::Helpers::NumberHelper and
ActiveSupport::NumberHelper::NumberConverter to slightly improve
performance.

Also remove documentation that incorrectly states
ActiveSupport::NumberHelper supports the `raise:` option.
2021-08-25 21:44:45 -04:00
Nicholas Stuart aabc27fe15
Move `assert_raise` into behavior classes 2021-08-24 12:06:53 -07:00
Nicholas Stuart 2c15e00a2c
Address PR comments. 2021-08-24 10:09:07 -07:00
Nicholas Stuart 2e097e86d2
Add test case 2021-08-24 09:36:55 -07:00
Nicholas Stuart c83e690311
Revert the `raise_errors` param and Removed rescue block from `ActiveSupport::Cache::RedisCacheStore#handle_exception` 2021-08-24 09:33:08 -07:00
Nicholas Stuart 22b000bde8
Update CHANGELOG.md 2021-08-23 20:29:18 -07:00
Nicholas Stuart 7f1129277b
init commit 2021-08-23 17:35:00 -07:00
Xavier Noria fddfaa08af Move AS::Dependencies.clear to the main file 2021-08-23 17:49:48 +02:00
Xavier Noria a8fa8b0ef8 Delete AS::Dependencies.verbose=
As documented, the public way to trace autoloading activity
is Rails.autoloaders.log!
2021-08-23 10:05:13 +02:00
Xavier Noria 61d7f33f67 Delete AS::Dependencies.autoloaded_constants 2021-08-23 10:05:13 +02:00
Xavier Noria 86a55dbe0f Delete private constant AS::Dependencies::UNBOUND_METHOD_MODULE_NAME 2021-08-23 10:05:13 +02:00
Xavier Noria 651737f059 AS::Dependencies no longer extends self
AS::Dependencies is not meant to be used as a mixin. I guess extend self
made sense time ago.
2021-08-23 10:05:13 +02:00
Xavier Noria 7bbe1f4bce Delete the classic version of AS::Dependencies.clear 2021-08-23 10:05:08 +02:00
Xavier Noria 08481be86e Delete the classic version of AS::Dependencies.autoloaded_constants 2021-08-23 09:20:52 +02:00
Xavier Noria b99b14a1cf Delete AS::Dependencies.autoloaded? 2021-08-23 09:04:35 +02:00
Xavier Noria 39a7658b61 Deletes spurious spaces 2021-08-23 00:49:18 +02:00
Xavier Noria 340b39ea31 Remove autoloading logic from AS::DescendantsTracker
The descendants tracker is a generic tracker that you can use anywhere.
In particular, outside Rails applications.

Should provide API to clear only a subset of classes, but in my view
should know nothing about autoloading. That is a concern of client code.
2021-08-23 00:24:26 +02:00
Xavier Noria 6a2a824e85 Namespace fixture classes in this test
This test was defining classes with common names like `Parent` or `Child` in the
top-level namespace. Better to have them below a custom one.
2021-08-22 22:08:28 +02:00