diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-24 23:17:20 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-24 23:17:20 +0000 |
commit | 3010d5eeb93ff4f30a97350ad8bb7dd19cd409fa (patch) | |
tree | f9b1e80f7c6b7d0885edcee166c6d5f42d387f67 | |
parent | 69d6e7d94915e42acc6da8943af605e1db96e428 (diff) | |
download | ruby-3010d5eeb93ff4f30a97350ad8bb7dd19cd409fa.tar.gz |
optparse.rb: literal newline
* lib/optparse.rb (OptionParser#summarize): use literal newline to
join option summaries as IO#puts does, not the special gloval
variable $/.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62032 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-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 05415901a3..afd4d45ed4 100644 --- a/lib/optparse.rb +++ b/lib/optparse.rb @@ -1237,7 +1237,7 @@ XXX # +indent+:: Indentation, defaults to @summary_indent. # def summarize(to = [], width = @summary_width, max = width - 1, indent = @summary_indent, &blk) - blk ||= proc {|l| to << (l.index($/, -1) ? l : l + $/)} + blk ||= proc {|l| to << (l.index(nl, -1) ? l : l + nl)} visit(:summarize, {}, {}, width, max, indent, &blk) to end |