diff options
author | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-09-20 02:44:49 +0000 |
---|---|---|
committer | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-09-20 02:44:49 +0000 |
commit | a91cd48aa19dd31ec5abb6e4b982f2077bedcbcd (patch) | |
tree | aca9392a4cd4845064c1e89bc50870db53fc6381 | |
parent | cfadd7253245525c66c467a88d9cf5d868f16957 (diff) |
* 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
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | lib/optparse.rb | 2 |
2 files changed, 5 insertions, 1 deletions
@@ -1,3 +1,7 @@ +Sat Sep 20 11:43:08 2008 Yusuke Endoh <mame@tsg.ne.jp> + + * lib/optparse.rb (summarize): separator "" should output new line. + Sat Sep 20 08:07:34 2008 NARUSE, Yui <naruse@ruby-lang.org> * 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) |