summaryrefslogtreecommitdiff
path: root/lib/optparse.rb
diff options
context:
space:
mode:
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 aef3c0d4862..f457b072a96 100644
--- a/lib/optparse.rb
+++ b/lib/optparse.rb
@@ -632,7 +632,7 @@ class OptionParser
list.each do |opt|
if opt.respond_to?(:summarize) # perhaps OptionParser::Switch
opt.summarize(*args, &block)
- elsif !opt
+ elsif !opt or opt.empty?
yield("")
elsif opt.respond_to?(:each_line)
opt.each_line(&block)