mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Removed warnings about shadowing variables
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user