mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #6395 from kennyj/fix_warning_20120519-2
Fix warning: shadowing outer local variable - constant.
This commit is contained in:
commit
26bdcf7299
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