Don't shadow outer local variable

This commit is contained in:
Jack Nagel 2013-02-17 20:57:00 -06:00
parent 528072f7d7
commit 0c27a8765e

View File

@ -106,10 +106,10 @@ class Options
when self then arg
when Option then new << arg
when Array
opts = arg.map do |arg|
case arg
when /^-[^-]+$/ then arg[1..-1].split(//)
else arg
opts = arg.map do |_arg|
case _arg
when /^-[^-]+$/ then _arg[1..-1].split(//)
else _arg
end
end.flatten
new(opts.map { |o| Option.new(o) })