diff options
author | José Valim <jose.valim@gmail.com> | 2011-06-20 06:48:17 -0700 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-06-20 06:48:17 -0700 |
commit | 89b3293a54f14d4787d79ab275a6492964c7e3e1 (patch) | |
tree | 83b806fff3612545092682767b95d90da342816f /railties/lib/rails/generators/base.rb | |
parent | b7c8e0bb0c70070d6fa28e3da1566e0ffaf27704 (diff) | |
parent | 93f488e7fa81f6cc18e6b158073979c0fd0c3c3d (diff) | |
download | rails-89b3293a54f14d4787d79ab275a6492964c7e3e1.tar.gz rails-89b3293a54f14d4787d79ab275a6492964c7e3e1.tar.bz2 rails-89b3293a54f14d4787d79ab275a6492964c7e3e1.zip |
Merge pull request #1784 from gazay/3-1-stable-shadowing-variables
Removing shadowing outer local variables warnings
Diffstat (limited to 'railties/lib/rails/generators/base.rb')
-rw-r--r-- | railties/lib/rails/generators/base.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/railties/lib/rails/generators/base.rb b/railties/lib/rails/generators/base.rb index 1f6a7a2f59..b9dc31457a 100644 --- a/railties/lib/rails/generators/base.rb +++ b/railties/lib/rails/generators/base.rb @@ -259,9 +259,9 @@ module Rails extra << false unless Object.method(:const_defined?).arity == 1 # Extract the last Module in the nesting - last = nesting.inject(Object) do |last, nest| - break unless last.const_defined?(nest, *extra) - last.const_get(nest) + last = nesting.inject(Object) do |last_module, nest| + break unless last_module.const_defined?(nest, *extra) + last_module.const_get(nest) end if last && last.const_defined?(last_name.camelize, *extra) |