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 => "this.file that.rb"
|
||||||
# git :add => "onefile.rb", :rm => "badfile.cxx"
|
# git :add => "onefile.rb", :rm => "badfile.cxx"
|
||||||
#
|
#
|
||||||
def git(command={})
|
def git(commands={})
|
||||||
if command.is_a?(Symbol)
|
if commands.is_a?(Symbol)
|
||||||
run "git #{command}"
|
run "git #{commands}"
|
||||||
else
|
else
|
||||||
command.each do |command, options|
|
commands.each do |command, options|
|
||||||
run "git #{command} #{options}"
|
run "git #{command} #{options}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -259,9 +259,9 @@ module Rails
|
||||||
extra << false unless Object.method(:const_defined?).arity == 1
|
extra << false unless Object.method(:const_defined?).arity == 1
|
||||||
|
|
||||||
# Extract the last Module in the nesting
|
# Extract the last Module in the nesting
|
||||||
last = nesting.inject(Object) do |last, nest|
|
last = nesting.inject(Object) do |last_module, nest|
|
||||||
break unless last.const_defined?(nest, *extra)
|
break unless last_module.const_defined?(nest, *extra)
|
||||||
last.const_get(nest)
|
last_module.const_get(nest)
|
||||||
end
|
end
|
||||||
|
|
||||||
if last && last.const_defined?(last_name.camelize, *extra)
|
if last && last.const_defined?(last_name.camelize, *extra)
|
||||||
|
|
Loading…
Reference in a new issue