mirror of https://github.com/rails/rails
Delete AS::Dependencies.remove_unloadable_constants!
This commit is contained in:
parent
d3ffcafb14
commit
7b2223be8b
|
@ -189,7 +189,6 @@ module ActiveSupport # :nodoc:
|
|||
Dependencies.unload_interlock do
|
||||
loaded.clear
|
||||
loading.clear
|
||||
remove_unloadable_constants!
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -245,19 +244,6 @@ module ActiveSupport # :nodoc:
|
|||
mod_name == "Object" ? name.to_s : "#{mod_name}::#{name}"
|
||||
end
|
||||
|
||||
# Remove the constants that have been autoloaded, and those that have been
|
||||
# marked for unloading. Before each constant is removed a callback is sent
|
||||
# to its class/module if it implements +before_remove_const+.
|
||||
#
|
||||
# The callback implementation should be restricted to cleaning up caches, etc.
|
||||
# as the environment will be in an inconsistent state, e.g. other constants
|
||||
# may have already been unloaded and not accessible.
|
||||
def remove_unloadable_constants!
|
||||
autoloaded_constants.each { |const| remove_constant const }
|
||||
autoloaded_constants.clear
|
||||
explicitly_unloadable_constants.each { |const| remove_constant const }
|
||||
end
|
||||
|
||||
# Get the reference for class named +name+.
|
||||
# Raises an exception if referenced class does not exist.
|
||||
def constantize(name)
|
||||
|
|
Loading…
Reference in New Issue