Bug #8537

RDoc cannot parse ext/objspace

Added by Zachary Scott 10 months ago. Updated 10 months ago.

[ruby-core:55525]
Status:Closed
Priority:Normal
Assignee:Eric Hodel
Category:ext
Target version:2.1.0
ruby -v:ruby 2.1.0dev (2013-06-16 trunk 41328) [x86_64-darwin12.3.0] Backport:1.9.3: UNKNOWN, 2.0.0: UNKNOWN

Description

Maybe bug in rdoc or objspace extension

Associated revisions

Revision 41354
Added by Benoit Daloze 10 months ago

  • gc.c (ObjectSpace): is a module not a class.
  • ext/objspace/objspace.c: try to include overview in rdoc, see #8537.

Revision 41355
Added by Benoit Daloze 10 months ago

  • ext/objspace/objspace.c: let rdoc know about objspace methods. Specify 'objspace' should be required. See #8537.

Revision 41382
Added by Zachary Scott 10 months ago

  • ext/objspace/objecttracing.c: Teach rdoc objecttracing.c [Bug #8537]

History

#1 Updated by Benoit Daloze 10 months ago

I made a couple changes and it now appears in ri ObjectSpace,
but only when I generate again the documentation (for example, by touching ext/objspace/objspace.c),
not when make clean && make install (only the non-extension description is shown).

It definitely sounds as a RDoc bug therefore.

I also made rdoc know about the extension methods.

#2 Updated by Zachary Scott 10 months ago

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

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


  • ext/objspace/objecttracing.c: Teach rdoc objecttracing.c [Bug #8537]

#3 Updated by Benoit Daloze 10 months ago

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

@zzak: The overview of objspace ext comes before the general doc for ObjectSpace,
is that avoidable?

Also, with r41380, I cannot know anymore using for instance ri ObjectSpace.memsize_of that I need to require 'objspace' to use it. Is it clear on the html page generated (from which lib/ext do methods come) ?

#4 Updated by Zachary Scott 10 months ago

Eregon (Benoit Daloze) wrote:

@zzak: The overview of objspace ext comes before the general doc for ObjectSpace,
is that avoidable?

What do you mean?

Also, with r41380, I cannot know anymore using for instance ri ObjectSpace.memsize_of that I need to require 'objspace' to use it. Is it clear on the html page generated (from which lib/ext do methods come) ?

I think we should add doc to say 'extension method', the whole require bit is a bit redundant.

#5 Updated by Benoit Daloze 10 months ago

zzak (Zachary Scott) wrote:

Eregon (Benoit Daloze) wrote:

@zzak: The overview of objspace ext comes before the general doc for ObjectSpace,
is that avoidable?

What do you mean?

See https://gist.github.com/eregon/bf86d335fdc9a36d96c0

Also, with r41380, I cannot know anymore using for instance ri ObjectSpace.memsize_of that I need to require 'objspace' to use it. Is it clear on the html page generated (from which lib/ext do methods come) ?

I think we should add doc to say 'extension method', the whole require bit is a bit redundant.

It is redundant at source level but not so much when browsing documentation.
Unless there is a clear way to link to which method is introduced by which extension,
I think it is needed to "link manually" and not sure something like
"this methods belongs to the objspace library" is better than "You need to require 'objspace' to use this method."

#6 Updated by Zachary Scott 10 months ago

  • Status changed from Open to Closed

Hi

Also available in: Atom PDF