RDoc :enddoc:

From: Tanaka Akira <akr@...17n.org>
Date: 2004-04-10 05:38:59 UTC
List: ruby-core #2764
I found that RDoc document some method after :enddoc:.  Is it
intentional?

% cat a.rb 
module M
  def m1() end

  # :enddoc:

  def m2() end
end
% rdoc a.rb

                               a.rb: m..
Generating HTML...

Files:   1
Classes: 0
Modules: 1
Methods: 2
Elapsed: 0.217s
% grep m2 doc/**/*(.)
doc/files/a_rb.html:                    <a href="#M000001">m2</a>&nbsp;&nbsp;
doc/files/a_rb.html:                                    <span class="method-name">m2</span><span class="method-args">()</span>
doc/files/a_rb.src/M000001.html:    m2 (a.rb)
doc/files/a_rb.src/M000001.html:        <title>m2 (a.rb)</title>
doc/files/a_rb.src/M000001.html:  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">m2</span>() <span class="ruby-keyword kw">end</span></pre>
doc/fr_method_index.html:               <a href="files/a_rb.html#M000001">m2 (a.rb)</a><br />
% rdoc --version
RDoc V1.0pr1: 2004/04/04 05:02:23 (1.6) 
% ruby --version
ruby 1.9.0 (2004-04-09) [i686-linux]

Note that I found that RDoc doesn't document m2 with :stopdoc: and :startdoc:.

module M
  def m1
  end

  # :stopdoc:

  def m2
  end
 
  # :startdoc:
end

So I guess current :enddoc: behavior is not intentional because consistency.
-- 
Tanaka Akira

In This Thread

Prev Next