1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Don't include &block if we have yield parameters

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6248 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
dave 2004-05-05 17:02:47 +00:00
parent 6776688a2d
commit 3d33a14369
4 changed files with 18 additions and 0 deletions

View file

@ -1,3 +1,9 @@
Thu May 6 01:59:04 2004 Dave Thomas <dave@pragprog.com>
* lib/rdoc/generators/html_generator.rb (Generators::HtmlMethod::params):
Don't include the &block parameter if we have explicit
yield parameters.
Wed May 5 03:52:31 2004 Masatoshi SEKI <m_seki@mva.biglobe.ne.jp>
* lib/rinda/ring.rb: use recv instead of recvfrom.

View file

@ -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] == ?(

View file

@ -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] == ?(

View file

@ -1968,6 +1968,7 @@ module RDoc
remove_token_listener(meth)
meth.comment = comment
end
def skip_method(container)