summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--lib/optparse.rb2
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 2a16a9222dc..d60772d1247 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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 aef3c0d4862..f457b072a96 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)