diff --git a/lib/active_support/dependencies.rb b/lib/active_support/dependencies.rb index 15d32dc11e..3976bb6bee 100644 --- a/lib/active_support/dependencies.rb +++ b/lib/active_support/dependencies.rb @@ -403,7 +403,7 @@ module ActiveSupport #:nodoc: raise ArgumentError, "A copy of #{from_mod} has been removed from the module tree but is still active!" end - raise ArgumentError, "#{from_mod} is not missing constant #{const_name}!" if uninherited_const_defined?(from_mod, const_name) + return from_mod.const_get(const_name) if uninherited_const_defined?(from_mod, const_name) qualified_name = qualified_name_for from_mod, const_name path_suffix = qualified_name.underscore