From f717db5fc8c0f087832baa1b11056938d68f702c Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 5 Nov 2003 10:09:58 +0000 Subject: * lib/optparse.rb (OptionParser::Switch::PlacedArgument::parse): do not remove next argument if empty value is placed. * test/optparse: added. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4903 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/optparse.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/optparse.rb b/lib/optparse.rb index 22c03ff5e..f0b97ba12 100644 --- a/lib/optparse.rb +++ b/lib/optparse.rb @@ -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 -- cgit