diff options
-rw-r--r-- | Gemfile.lock | 4 | ||||
-rw-r--r-- | activesupport/activesupport.gemspec | 2 | ||||
-rw-r--r-- | activesupport/lib/active_support/dependencies/zeitwerk_integration.rb | 6 |
3 files changed, 8 insertions, 4 deletions
diff --git a/Gemfile.lock b/Gemfile.lock index 5e7f3d2b74..6a8f9040d7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -70,7 +70,7 @@ PATH i18n (>= 0.7, < 2) minitest (~> 5.1) tzinfo (~> 1.1) - zeitwerk (~> 1.3, >= 1.3.4) + zeitwerk (~> 1.4) rails (6.0.0.beta3) actioncable (= 6.0.0.beta3) actionmailbox (= 6.0.0.beta3) @@ -517,7 +517,7 @@ GEM websocket-extensions (0.1.3) xpath (3.2.0) nokogiri (~> 1.8) - zeitwerk (1.3.4) + zeitwerk (1.4.0) PLATFORMS java diff --git a/activesupport/activesupport.gemspec b/activesupport/activesupport.gemspec index e55d73c717..51f5086cca 100644 --- a/activesupport/activesupport.gemspec +++ b/activesupport/activesupport.gemspec @@ -34,5 +34,5 @@ Gem::Specification.new do |s| s.add_dependency "tzinfo", "~> 1.1" s.add_dependency "minitest", "~> 5.1" s.add_dependency "concurrent-ruby", "~> 1.0", ">= 1.0.2" - s.add_dependency "zeitwerk", "~> 1.3", ">= 1.3.4" + s.add_dependency "zeitwerk", "~> 1.4" end diff --git a/activesupport/lib/active_support/dependencies/zeitwerk_integration.rb b/activesupport/lib/active_support/dependencies/zeitwerk_integration.rb index e00307d257..c6fdade006 100644 --- a/activesupport/lib/active_support/dependencies/zeitwerk_integration.rb +++ b/activesupport/lib/active_support/dependencies/zeitwerk_integration.rb @@ -21,7 +21,11 @@ module ActiveSupport end def autoloaded_constants - (Rails.autoloaders.main.loaded + Rails.autoloaders.once.loaded).to_a + cpaths = [] + Rails.autoloaders.each do |autoloader| + cpaths.concat(autoloader.loaded_cpaths.to_a) + end + cpaths end def autoloaded?(object) |