diff options
Diffstat (limited to 'activesupport/lib/active_support/inflector')
-rw-r--r-- | activesupport/lib/active_support/inflector/methods.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activesupport/lib/active_support/inflector/methods.rb b/activesupport/lib/active_support/inflector/methods.rb index e5b0cf4f9e..2acc6ddee5 100644 --- a/activesupport/lib/active_support/inflector/methods.rb +++ b/activesupport/lib/active_support/inflector/methods.rb @@ -212,10 +212,10 @@ module ActiveSupport # Go down the ancestors to check it it's owned # directly before we reach Object or the end of ancestors. - constant = constant.ancestors.inject do |constant, ancestor| - break constant if ancestor == Object + constant = constant.ancestors.inject do |const, ancestor| + break const if ancestor == Object break ancestor if ancestor.const_defined?(name, false) - constant + const end # owner is in Object, so raise |