summaryrefslogtreecommitdiffstats
path: root/lib/rdoc
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-03-09 04:52:53 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-03-09 04:52:53 +0000
commit084920b6edf9d005fad4fce0beabd0a82ea25976 (patch)
tree1fc1c68f73822acd53459069b5d07db6ef0ada05 /lib/rdoc
parent27dc5a483ec6ed1f379cbd16c22054a4bbe2bf5f (diff)
downloadruby-084920b6edf9d005fad4fce0beabd0a82ea25976.tar.gz
ruby-084920b6edf9d005fad4fce0beabd0a82ea25976.tar.xz
ruby-084920b6edf9d005fad4fce0beabd0a82ea25976.zip
Restore missing line to RDoc::Generator#params. Patch by Lincoln Stoll.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15735 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rdoc')
-rw-r--r--lib/rdoc/generator.rb15
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/rdoc/generator.rb b/lib/rdoc/generator.rb
index 9859a3244..322b25bf7 100644
--- a/lib/rdoc/generator.rb
+++ b/lib/rdoc/generator.rb
@@ -921,26 +921,27 @@ module RDoc::Generator
def params
# params coming from a call-seq in 'C' will start with the
# method name
- if p !~ /^\w/
- p = @context.params.gsub(/\s*\#.*/, '')
- p = p.tr("\n", " ").squeeze(" ")
- p = "(" + p + ")" unless p[0] == ?(
+ params = @context.params
+ if params !~ /^\w/
+ params = @context.params.gsub(/\s*\#.*/, '')
+ params = params.tr("\n", " ").squeeze(" ")
+ params = "(" + params + ")" unless params[0] == ?(
if (block = @context.block_params)
# If this method has explicit block parameters, remove any
# explicit &block
- p.sub!(/,?\s*&\w+/, '')
+ params.sub!(/,?\s*&\w+/, '')
block.gsub!(/\s*\#.*/, '')
block = block.tr("\n", " ").squeeze(" ")
if block[0] == ?(
block.sub!(/^\(/, '').sub!(/\)/, '')
end
- p << " {|#{block.strip}| ...}"
+ params << " {|#{block.strip}| ...}"
end
end
- CGI.escapeHTML(p)
+ CGI.escapeHTML(params)
end
def create_source_code_file(code_body)