Skip to content

Commit a64226d

Browse files
committed
Fix variable expansion in yield
The AnyMethod#param_seq removes string after "#" as comment, but comment token is removed in Parser::Ruby#parse_method_or_yield_parameters. This commit fixes it.
1 parent 1152955 commit a64226d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/rdoc/any_method.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,8 +276,7 @@ def param_seq
276276
# &block
277277
params.sub!(/,?\s*&\w+/, '')
278278

279-
block = @block_params.gsub(/\s*\#.*/, '')
280-
block = block.tr("\n", " ").squeeze(" ")
279+
block = @block_params.tr("\n", " ").squeeze(" ")
281280
if block[0] == ?(
282281
block.sub!(/^\(/, '').sub!(/\)/, '')
283282
end

0 commit comments

Comments
 (0)