Bug #6666

Documentation Improve - rdoc does not know where rb_obj_methods is (#methods)

Added by Robert A. Heiler almost 2 years ago. Updated almost 2 years ago.

[ruby-core:45944]
Status:Closed
Priority:Low
Assignee:Eric Hodel
Category:-
Target version:1.9.3
ruby -v:ruby 1.9.3p194 Backport:

Description

Hi.

It seems there is no simple online documentation available what
#methods is doing in Ruby:

can't find #methods anywhere in the docs
really strange
the docs are normally quite thorough

Upon looking at this, we saw the method defined first in
object.c here:

object.c: rbdefinemethod(rbmKernel, "methods", rbobj_methods, -1);

https://github.com/ruby/ruby/blob/trunk/object.c#L2897

Referring to:

class.c: rbobjmethods(int argc, VALUE *argv, VALUE obj)

class.c has the proper rdoc documentation for #methods there.
But this does not seem to show up in the online docu.

On IRC, Mon_Ouie said that a reference is missing in order
to make this work:

class.c has the rdoc docu though
All that's missing is the /* in class.c / comment
to make rdoc find the method
Yeah, the method is documented, but RDoc doesn't know in what file it is defined, since it's not object.c
So it needs a /
in class.c */ comment to know where to look for it

My request:

Could class.c include this comment so that the online documentation will point
to the proper #methods documentation?

Associated revisions

Revision 36272
Added by Eric Hodel almost 2 years ago

  • object.c (InitObject): Added RDoc location pointers for Kernel#methods, Kernel#protectedmethods, Kernel#privatemethods and Kernel#publicmethods. [Bug #6666]

History

#1 Updated by Yusuke Endoh almost 2 years ago

  • Status changed from Open to Assigned
  • Assignee set to Eric Hodel

Maybe the comment is needed after rbdefinemethod, not in class.c?

  • rbdefinemethod(rbmKernel, "methods", rbobj_methods, -1);
  • rbdefinemethod(rbmKernel, "methods", rbobj_methods, -1); /* in class.c */

Eric, could you check this?

Yusuke Endoh mame@tsg.ne.jp

#2 Updated by Eric Hodel almost 2 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r36272.
markus, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • object.c (InitObject): Added RDoc location pointers for Kernel#methods, Kernel#protectedmethods, Kernel#privatemethods and Kernel#publicmethods. [Bug #6666]

Also available in: Atom PDF