summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-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