diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | lib/optparse.rb | 2 |
2 files changed, 7 insertions, 1 deletions
@@ -1,3 +1,9 @@ +Mon Nov 5 05:17:04 2007 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]. + Mon Nov 5 01:20:33 2007 Yukihiro Matsumoto <matz@ruby-lang.org> * parse.y (call_args): remove "parenthesize argument(s) for future diff --git a/lib/optparse.rb b/lib/optparse.rb index 6fddb81a72..d33ad536e2 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 |