mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
308f4f2df2
commit
e55f7cf6c3
2 changed files with 7 additions and 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>
|
Mon Nov 5 01:20:33 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
* parse.y (call_args): remove "parenthesize argument(s) for future
|
* parse.y (call_args): remove "parenthesize argument(s) for future
|
||||||
|
|
|
@ -379,7 +379,7 @@ class OptionParser
|
||||||
while s = lopts.shift
|
while s = lopts.shift
|
||||||
l = left[-1].length + s.length
|
l = left[-1].length + s.length
|
||||||
l += arg.length if left.size == 1 && arg
|
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
|
left[-1] << if left[-1].empty? then ' ' * 4 else ', ' end << s
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue