From ae07806858072cd66611c165d1eed2a113e639e5 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Sat, 25 Oct 2014 13:50:42 +0200 Subject: fixes circularity check in dependencies The check for circular loading should depend on a stack of files being loaded at the moment, rather than the collection of loaded files. This showed up indirectly in #16468, where a misspelled helper would incorrectly result in a circularity error message. References #16468 --- activesupport/test/dependencies_test_helpers.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'activesupport/test/dependencies_test_helpers.rb') diff --git a/activesupport/test/dependencies_test_helpers.rb b/activesupport/test/dependencies_test_helpers.rb index 9268512a97..e4d5197112 100644 --- a/activesupport/test/dependencies_test_helpers.rb +++ b/activesupport/test/dependencies_test_helpers.rb @@ -13,6 +13,7 @@ module DependenciesTestHelpers ActiveSupport::Dependencies.autoload_paths = prior_autoload_paths ActiveSupport::Dependencies.mechanism = old_mechanism ActiveSupport::Dependencies.explicitly_unloadable_constants = [] + ActiveSupport::Dependencies.clear end def with_autoloading_fixtures(&block) -- cgit v1.2.3