From a91cd48aa19dd31ec5abb6e4b982f2077bedcbcd Mon Sep 17 00:00:00 2001 From: mame Date: Sat, 20 Sep 2008 02:44:49 +0000 Subject: * lib/optparse.rb (summarize): separator "" should output new line. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19435 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ lib/optparse.rb | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) 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) -- cgit v1.2.3