mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Restore missing line to RDoc::Generator#params. Patch by Lincoln Stoll.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15735 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
861219ce4a
commit
74a1543645
2 changed files with 13 additions and 7 deletions
|
@ -1,3 +1,8 @@
|
|||
Sun Mar 9 13:51:21 2008 Eric Hodel <drbrain@segment7.net>
|
||||
|
||||
* lib/rdoc/generator.rb: Restore missing line to #params. Patch by
|
||||
Lincoln Stoll <lstoll at lstoll.net>
|
||||
|
||||
Sun Mar 9 09:52:00 2008 Eric Hodel <drbrain@segment7.net>
|
||||
|
||||
* lib/rdoc/code_objects.rb: Remove debugging Kernel#p. Patch by
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue