lib/args_parser/styles/equal.rb in args_parser-0.1.6 vs lib/args_parser/styles/equal.rb in args_parser-0.2.0
- old
+ new
@@ -10,14 +10,14 @@
is_option = /^-+([^-=\s]+)$/
is_param = /^-+([^-=\s]+)=(.+)$/
argv.each_with_index do |arg, i|
if arg =~ is_option
- k,v = [arg.scan(is_option)[0][0], true]
+ k,v = arg.scan(is_option)[0][0], true
elsif arg =~ is_param
k,v = arg.scan(is_param)[0]
else
- self.argv.push arg
+ @argv.push arg
end
if k and v
k = k.strip.to_sym
k = aliases[k] if aliases[k]
params[k][:value] = v