diff options
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/inflector/methods.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/inflector/methods.rb b/activesupport/lib/active_support/inflector/methods.rb index 274dc90eff..11f3c4c46f 100644 --- a/activesupport/lib/active_support/inflector/methods.rb +++ b/activesupport/lib/active_support/inflector/methods.rb @@ -204,7 +204,7 @@ module ActiveSupport names.inject(Object) do |constant, name| candidate = constant.const_get(name) - if constant.const_defined?(name, false) || !Object.const_defined?(name) + if constant.const_defined?(name, false) || constant == Object || !Object.const_defined?(name) candidate else # Go down the ancestors to check it it's owned |