summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-07 18:07:29 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-07 18:07:29 +0000
commitfd0f7b08cb550827355d86e9a26cb4186bb61b8f (patch)
tree468d8b79e4082f83fec5b3155b1980e7a81211b7
parent24a9bf988c896f073d0d483a117c4197f93006c2 (diff)
merge revision(s) 13823:
* lib/optparse.rb (OptionParser::Switch::summarize): fix for long form option with very long argument. a patch from Kobayashi Noritada <nori1 AT dolphin.c.u-tokyo.ac.jp> in [ruby-list:44179]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@16923 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--lib/optparse.rb2
-rw-r--r--version.h2
3 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index a28c5a8722..4a00e7e9c6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Sun Jun 8 03:07:19 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * lib/optparse.rb (OptionParser::Switch::summarize): fix for long form
+ option with very long argument. a patch from Kobayashi Noritada
+ <nori1 AT dolphin.c.u-tokyo.ac.jp> in [ruby-list:44179].
+
Sun Jun 8 03:04:38 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* numeric.c (fix_pow): returns infinity for 0**-1. [ruby-dev:32084]
diff --git a/lib/optparse.rb b/lib/optparse.rb
index 2c91cd004f..417997d9bb 100644
--- a/lib/optparse.rb
+++ b/lib/optparse.rb
@@ -379,7 +379,7 @@ class OptionParser
while s = lopts.shift
l = left[-1].length + s.length
l += arg.length if left.size == 1 && arg
- l < max or left << ''
+ l < max or sopts.empty? or left << ''
left[-1] << if left[-1].empty? then ' ' * 4 else ', ' end << s
end
diff --git a/version.h b/version.h
index 97bb723d95..3ba66266ab 100644
--- a/version.h
+++ b/version.h
@@ -2,7 +2,7 @@
#define RUBY_RELEASE_DATE "2008-06-08"
#define RUBY_VERSION_CODE 186
#define RUBY_RELEASE_CODE 20080608
-#define RUBY_PATCHLEVEL 139
+#define RUBY_PATCHLEVEL 140
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 8