diff options
author | Alexey Gaziev <alex.gaziev@gmail.com> | 2011-06-20 17:22:09 +0400 |
---|---|---|
committer | Alexey Gaziev <alex.gaziev@gmail.com> | 2011-06-20 17:22:09 +0400 |
commit | 87329ef67f9502aca5a9331610dc97b795cfda94 (patch) | |
tree | 7207c5bacb7a2288909d535c486c4527638f71fd | |
parent | 93b7da478b81c93afd9410a506e5d37ad607b900 (diff) | |
download | rails-87329ef67f9502aca5a9331610dc97b795cfda94.tar.gz rails-87329ef67f9502aca5a9331610dc97b795cfda94.tar.bz2 rails-87329ef67f9502aca5a9331610dc97b795cfda94.zip |
Removed warnings about shadowing variables
-rw-r--r-- | railties/lib/rails/generators/actions.rb | 8 | ||||
-rw-r--r-- | railties/lib/rails/generators/base.rb | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/railties/lib/rails/generators/actions.rb b/railties/lib/rails/generators/actions.rb index d31a3262e3..433a56dc57 100644 --- a/railties/lib/rails/generators/actions.rb +++ b/railties/lib/rails/generators/actions.rb @@ -114,11 +114,11 @@ module Rails # git :add => "this.file that.rb" # git :add => "onefile.rb", :rm => "badfile.cxx" # - def git(command={}) - if command.is_a?(Symbol) - run "git #{command}" + def git(commands={}) + if commands.is_a?(Symbol) + run "git #{commands}" else - command.each do |command, options| + commands.each do |command, options| run "git #{command} #{options}" end end 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) |