diff --git a/ChangeLog b/ChangeLog index 87d448f614..0412eb3ca6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Mon Nov 5 05:17:04 2007 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]. + Mon Nov 5 01:20:33 2007 Yukihiro Matsumoto * parse.y (call_args): remove "parenthesize argument(s) for future diff --git a/lib/optparse.rb b/lib/optparse.rb index 4cf2230448..0479c5af6b 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