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 | 810138832fa81c4ed5dc88b67bd779a5cbb6b089 (patch) | |
| tree | b47e663e8dff55d03b47711001718a9b1f6557c4 /lib | |
| parent | afa7f79b118197e3b4d9ad661974af782165441e (diff) | |
| download | ruby-810138832fa81c4ed5dc88b67bd779a5cbb6b089.tar.gz ruby-810138832fa81c4ed5dc88b67bd779a5cbb6b089.tar.xz ruby-810138832fa81c4ed5dc88b67bd779a5cbb6b089.zip | |
* 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: http://svn.ruby-lang.org/repos/ruby/trunk@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 6fddb81a7..d33ad536e 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 |
