Bug #901

RDoc does not handle multiple method description for a C function properly

Added by Yuki Sonoda about 3 years ago. Updated 10 months ago.

[ruby-core:20613]
Status:Closed Start date:12/25/2008
Priority:High Due date:01/01/2009
Assignee:Eric Hodel % Done:

100%

Category:lib
Target version:1.9.1 Release Candidate
ruby -v:

Description

RDoc does not handle method description properly when some method descriptions are assigned onto a C function.
For example, documentation for Object#hash is curious.

This happened at trunk. ruby_1_8 branch seems to work correctly.

% ri-trunk --version
ri-trunk 2.2.2

% ri-trunk Object#object_id
----------------------------------------------------- Object#object_id
     obj.__id__       => fixnum
     obj.object_id    => fixnum

     From Ruby 1.9.1
----------------------------------------------------------------------
     Returns an integer identifier for obj. The same number will be 
     returned on all calls to id for a given object, and no two 
     active objects will share an id. Object#object_id is a different 
     concept from the :name notation, which returns the symbol id of 
     name. Replaces the deprecated Object#id.


% ri-trunk Object#hash
---------------------------------------------------------- Object#hash
     obj.__id__       => fixnum
     obj.object_id    => fixnum

     From Ruby 1.9.1
----------------------------------------------------------------------
         Document-method: <em>id</em>
         Document-method: object_id

         Returns an integer identifier for <em>obj</em>. The same number will
         be returned on all calls to <tt>id</tt> for a given object, and
         no two active objects will share an id.
         <tt>Object#object_id</tt> is a different concept from the
         <tt>:name</tt> notation, which returns the symbol id of
         <tt>name</tt>. Replaces the deprecated <tt>Object#id</tt>.

     /*

         call-seq:
            obj.hash    => fixnum

         Generates a <tt>Fixnum</tt> hash value for this object. This
         function must have the property that <tt>a.eql?(b)</tt> implies
         <tt>a.hash == b.hash</tt>. The hash value is used by class
         <tt>Hash</tt>. Any hash value that exceeds the capacity of a
         <tt>Fixnum</tt> will be truncated before being used.
       /

Related issues

follows ruby-trunk - Bug #470: File::openのドキュメント Closed 08/22/2008 12/24/2008

Associated revisions

Revision 20932
Added by Eric Hodel about 3 years ago

Don't coalesce adjacent comment blocks. [bug#901]

History

Updated by Eric Hodel about 3 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100
Applied in changeset r20932.

Also available in: Atom PDF