1
0
Fork 0
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:
kennyj 2012-05-19 23:54:52 +09:00
parent 329a5a4322
commit 3f1caaf23a

View file

@ -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