lib/rdoc/any_method.rb in rdoc-4.1.0 vs lib/rdoc/any_method.rb in rdoc-4.1.1

- old
+ new

@@ -238,10 +238,18 @@ params = @block_params else return [] end - params = params.gsub(/\s+/, '').split ',' + if @block_params then + # If this method has explicit block parameters, remove any explicit + # &block + params.sub!(/,?\s*&\w+/, '') + else + params.sub!(/\&(\w+)/, '\1') + end + + params = params.gsub(/\s+/, '').split(',').reject(&:empty?) params.map { |param| param.sub(/=.*/, '') } end ##