1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
mame 2008-09-20 02:44:49 +00:00
parent cfadd72532
commit a91cd48aa1
2 changed files with 5 additions and 1 deletions

View file

@ -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> 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 * parse.y: strings which contain only US-ASCII don't force to have

View file

@ -632,7 +632,7 @@ class OptionParser
list.each do |opt| list.each do |opt|
if opt.respond_to?(:summarize) # perhaps OptionParser::Switch if opt.respond_to?(:summarize) # perhaps OptionParser::Switch
opt.summarize(*args, &block) opt.summarize(*args, &block)
elsif !opt elsif !opt or opt.empty?
yield("") yield("")
elsif opt.respond_to?(:each_line) elsif opt.respond_to?(:each_line)
opt.each_line(&block) opt.each_line(&block)