diff options
Diffstat (limited to 'lib/rdoc/generators/html_generator.rb')
-rw-r--r-- | lib/rdoc/generators/html_generator.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/rdoc/generators/html_generator.rb b/lib/rdoc/generators/html_generator.rb index 75b056b8be..13d63e5a3c 100644 --- a/lib/rdoc/generators/html_generator.rb +++ b/lib/rdoc/generators/html_generator.rb @@ -922,6 +922,11 @@ module Generators p = "(" + p + ")" unless p[0] == ?( if (block = @context.block_params) + # If this method has explicit block parameters, remove any + # explicit &block + + p.sub!(/,?\s*&\w+/, '') + block.gsub!(/\s*\#.*/, '') block = block.tr("\n", " ").squeeze(" ") if block[0] == ?( |