mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Fix warning: shadowing outer local variable - constant.
This commit is contained in:
parent
329a5a4322
commit
3f1caaf23a
1 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue