mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/optparse.rb (OptionParser::Switch::PlacedArgument::parse):
do not remove next argument if empty value is placed. * test/optparse: added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4903 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
9983e4645e
commit
4dada1c8a2
7 changed files with 263 additions and 1 deletions
|
@ -354,7 +354,7 @@ Switch that can omit argument.
|
|||
end
|
||||
opt = (val = parse_arg(val, &error))[1]
|
||||
val = conv_arg(*val)
|
||||
if opt
|
||||
if opt and !arg
|
||||
argv.shift
|
||||
else
|
||||
val[0] = nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue