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
Родитель 6776688a2d
Коммит 3d33a14369
4 изменённых файлов: 18 добавлений и 0 удалений

Просмотреть файл

@ -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.

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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