From fd0f7b08cb550827355d86e9a26cb4186bb61b8f Mon Sep 17 00:00:00 2001 From: shyouhei Date: Sat, 7 Jun 2008 18:07:29 +0000 Subject: merge revision(s) 13823: * lib/optparse.rb (OptionParser::Switch::summarize): fix for long form option with very long argument. a patch from Kobayashi Noritada 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 --- ChangeLog | 6 ++++++ lib/optparse.rb | 2 +- version.h | 2 +- 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 + + * lib/optparse.rb (OptionParser::Switch::summarize): fix for long form + option with very long argument. a patch from Kobayashi Noritada + in [ruby-list:44179]. + Sun Jun 8 03:04:38 2008 Nobuyoshi Nakada * 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 -- cgit v1.2.3