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 | 3867226cdcf1b6fe1d2968b5f23a839e10121695 (patch) | |
| tree | aca9392a4cd4845064c1e89bc50870db53fc6381 | |
| parent | 59a213ed21d7d856d24112fd00fe0b4eb9c0e549 (diff) | |
| download | ruby-3867226cdcf1b6fe1d2968b5f23a839e10121695.tar.gz ruby-3867226cdcf1b6fe1d2968b5f23a839e10121695.tar.xz ruby-3867226cdcf1b6fe1d2968b5f23a839e10121695.zip | |
* lib/optparse.rb (summarize): separator "" should output new line.
git-svn-id: http://svn.ruby-lang.org/repos/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 aef3c0d48..f457b072a 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) |
