diff options
author | kennyj <kennyj@gmail.com> | 2012-05-19 23:54:52 +0900 |
---|---|---|
committer | kennyj <kennyj@gmail.com> | 2012-05-19 23:54:52 +0900 |
commit | 3f1caaf23a60df82a72873b4bfce4dc47aa51029 (patch) | |
tree | 35214b468dce58dbe2df4df377401e63019fa190 /activesupport/lib/active_support/inflector | |
parent | 329a5a43227be48b408b702438b355c087fd2866 (diff) | |
download | rails-3f1caaf23a60df82a72873b4bfce4dc47aa51029.tar.gz rails-3f1caaf23a60df82a72873b4bfce4dc47aa51029.tar.bz2 rails-3f1caaf23a60df82a72873b4bfce4dc47aa51029.zip |
Fix warning: shadowing outer local variable - constant.
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 |