diff --git a/ChangeLog b/ChangeLog index 2a16a9222d..d60772d124 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Sat Sep 20 11:43:08 2008 Yusuke Endoh + + * lib/optparse.rb (summarize): separator "" should output new line. + Sat Sep 20 08:07:34 2008 NARUSE, Yui * parse.y: strings which contain only US-ASCII don't force to have diff --git a/lib/optparse.rb b/lib/optparse.rb index aef3c0d486..f457b072a9 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)