mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Removed warnings about shadowing variables
This commit is contained in:
parent
93b7da478b
commit
87329ef67f
2 changed files with 7 additions and 7 deletions
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue