diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-11-04 20:17:06 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-11-04 20:17:06 +0000 |
commit | e55f7cf6c364c23ef5a44c3fd64dcc46189e1d50 (patch) | |
tree | d456d09ed5b4b04a5c89d601241dacbbf24be92f /lib | |
parent | 308f4f2df26a98f2f1e0801894c53f92dbe5fb9f (diff) |
* 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@13823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r-- | lib/optparse.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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 |