Delete AS::Dependencies.unhook!
This commit is contained in:
parent
2a22b4c53b
commit
bbe74a8c97
|
@ -34,8 +34,6 @@ end
|
|||
ActionViewTestSuiteUtils.require_helpers("#{__dir__}/fixtures/helpers")
|
||||
ActionViewTestSuiteUtils.require_helpers("#{__dir__}/fixtures/alternate_helpers")
|
||||
|
||||
ActiveSupport::Dependencies.hook!
|
||||
|
||||
Thread.abort_on_exception = true
|
||||
|
||||
# Show backtraces for deprecated behavior for quicker cleanup.
|
||||
|
|
|
@ -293,11 +293,6 @@ module ActiveSupport # :nodoc:
|
|||
end
|
||||
end
|
||||
|
||||
def unhook!
|
||||
ModuleConstMissing.exclude_from(Module)
|
||||
Loadable.exclude_from(Object)
|
||||
end
|
||||
|
||||
def load?
|
||||
mechanism == :load
|
||||
end
|
||||
|
|
|
@ -37,10 +37,6 @@ module ActiveSupport
|
|||
l = verbose ? logger || Rails.logger : nil
|
||||
Rails.autoloaders.each { |autoloader| autoloader.logger = l }
|
||||
end
|
||||
|
||||
def unhook!
|
||||
:no_op
|
||||
end
|
||||
end
|
||||
|
||||
module Inflector
|
||||
|
@ -103,7 +99,6 @@ module ActiveSupport
|
|||
end
|
||||
|
||||
def decorate_dependencies
|
||||
Dependencies.unhook!
|
||||
Dependencies.singleton_class.prepend(Decorations)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -245,13 +245,6 @@ module Rails
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
# Disable dependency loading during request cycle
|
||||
initializer :disable_dependency_loading do
|
||||
if config.eager_load && config.cache_classes && !config.enable_dependency_loading
|
||||
ActiveSupport::Dependencies.unhook!
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -305,13 +305,6 @@ class ZeitwerkIntegrationTest < ActiveSupport::TestCase
|
|||
assert_equal %i(main_autoloader), $zeitwerk_integration_reload_test
|
||||
end
|
||||
|
||||
test "unhooks" do
|
||||
boot
|
||||
|
||||
assert_equal Module, Module.method(:const_missing).owner
|
||||
assert_equal :no_op, deps.unhook!
|
||||
end
|
||||
|
||||
test "reloading invokes before_remove_const" do
|
||||
$before_remove_const_invoked = false
|
||||
|
||||
|
|
Loading…
Reference in New Issue