summaryrefslogtreecommitdiff
path: root/lib/optparse.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-11-05 10:09:58 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-11-05 10:09:58 +0000
commit4dada1c8a20c0fab0e058d7cd934c1c011617049 (patch)
treebf5ed7bc0310d7d113d3bf57d6e01eb92ba3413e /lib/optparse.rb
parent9983e4645ec127d90d402af42cb36e446cfaafe3 (diff)
* 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
Diffstat (limited to 'lib/optparse.rb')
-rw-r--r--lib/optparse.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/optparse.rb b/lib/optparse.rb
index 22c03ff5ee..f0b97ba12e 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