diff options
Diffstat (limited to 'lib/rdoc/code_objects.rb')
-rw-r--r-- | lib/rdoc/code_objects.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/rdoc/code_objects.rb b/lib/rdoc/code_objects.rb index 1d2e4d212..9bacab8f6 100644 --- a/lib/rdoc/code_objects.rb +++ b/lib/rdoc/code_objects.rb @@ -597,6 +597,12 @@ module RDoc p = "(" + p + ")" unless p[0] == ?( if (block = block_params) + # If this method has explicit block parameters, remove any + # explicit &block +$stderr.puts p + p.sub!(/,?\s*&\w+/) +$stderr.puts p + block.gsub!(/\s*\#.*/, '') block = block.tr("\n", " ").squeeze(" ") if block[0] == ?( |