diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-11-05 10:09:58 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-11-05 10:09:58 +0000 |
| commit | f717db5fc8c0f087832baa1b11056938d68f702c (patch) | |
| tree | bf5ed7bc0310d7d113d3bf57d6e01eb92ba3413e /lib | |
| parent | 092022dce1c962adf2f628992628e17ebb67ca1a (diff) | |
| download | ruby-f717db5fc8c0f087832baa1b11056938d68f702c.tar.gz ruby-f717db5fc8c0f087832baa1b11056938d68f702c.tar.xz ruby-f717db5fc8c0f087832baa1b11056938d68f702c.zip | |
* 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
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/optparse.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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 |
