From 368af204f18ba5f89d069a0c5fd502329a644a7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mislav=20Marohni=C4=87?= Date: Tue, 19 Oct 2010 15:52:02 +0200 Subject: [PATCH] supress ruby 1.9 warning about shadowing outer local variable --- lib/hub/commands.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/hub/commands.rb b/lib/hub/commands.rb index 93eb0082..aa1d9f96 100644 --- a/lib/hub/commands.rb +++ b/lib/hub/commands.rb @@ -149,16 +149,16 @@ module Hub if args.include?('--multiple') names = args.words[1..-1] # $ hub fetch - elsif name = args.words[1] + elsif remote_name = args.words[1] # $ hub fetch ,,... - if name =~ /^\w+(,\w+)+$/ - index = args.index(name) - args.delete(name) - names = name.split(',') + if remote_name =~ /^\w+(,\w+)+$/ + index = args.index(remote_name) + args.delete(remote_name) + names = remote_name.split(',') args.insert(index, *names) args.insert(index, '--multiple') else - names = [name] + names = [remote_name] end else names = [] -- GitLab