Skip to content

Commit 4cc9105

Browse files
authored
Merge pull request #540 from znz/tr_s
Use `tr_s` instead of `tr` and `squeeze`
2 parents a580422 + f466dc6 commit 4cc9105

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/rdoc/any_method.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ def param_seq
265265
params = params.sub(/(\|[^|]+\|)\s*\.\.\.\s*(end|\})/, '\1 \2')
266266
elsif @params then
267267
params = @params.gsub(/\s*\#.*/, '')
268-
params = params.tr("\n", " ").squeeze(" ")
268+
params = params.tr_s("\n ", " ")
269269
params = "(#{params})" unless params[0] == ?(
270270
else
271271
params = ''
@@ -276,7 +276,7 @@ def param_seq
276276
# &block
277277
params.sub!(/,?\s*&\w+/, '')
278278

279-
block = @block_params.tr("\n", " ").squeeze(" ")
279+
block = @block_params.tr_s("\n ", " ")
280280
if block[0] == ?(
281281
block.sub!(/^\(/, '').sub!(/\)/, '')
282282
end

0 commit comments

Comments
 (0)