From 7bbe1f4bce29a3c029fb7ddb1eea78ee848f6913 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Mon, 23 Aug 2021 09:25:27 +0200 Subject: [PATCH] Delete the classic version of AS::Dependencies.clear --- .../lib/active_support/dependencies.rb | 3 --- activesupport/test/dependencies_test.rb | 20 ------------------- 2 files changed, 23 deletions(-) diff --git a/activesupport/lib/active_support/dependencies.rb b/activesupport/lib/active_support/dependencies.rb index 6a6a47ced6..8a376a6b33 100644 --- a/activesupport/lib/active_support/dependencies.rb +++ b/activesupport/lib/active_support/dependencies.rb @@ -62,9 +62,6 @@ module ActiveSupport # :nodoc: # main autoloader. Used to clear state. mattr_accessor :_autoloaded_tracked_classes, default: Set.new - def clear - end - # Search for a file in autoload_paths matching the provided suffix. def search_for_file(path_suffix) path_suffix += ".rb" unless path_suffix.end_with?(".rb") diff --git a/activesupport/test/dependencies_test.rb b/activesupport/test/dependencies_test.rb index f1bb637e5b..b69bec022d 100644 --- a/activesupport/test/dependencies_test.rb +++ b/activesupport/test/dependencies_test.rb @@ -16,26 +16,6 @@ module ModuleWithConstant InheritedConstant = "Hello" end -class DependenciesTest < ActiveSupport::TestCase - setup do - @loaded_features_copy = $LOADED_FEATURES.dup - $LOAD_PATH << "test" - end - - teardown do - ActiveSupport::Dependencies.clear - $LOADED_FEATURES.replace(@loaded_features_copy) - $LOAD_PATH.pop - end - - def test_smart_name_error_strings - e = assert_raise NameError do - Object.module_eval "ImaginaryObject" - end - assert_includes "uninitialized constant ImaginaryObject", e.message - end -end - class RequireDependencyTest < ActiveSupport::TestCase setup do @loaded_features_copy = $LOADED_FEATURES.dup