rdoc mistakenly picking up C functions

L

leon breedt

hi,

i have some C functions in an extension i'm documenting that are
commented out (disabled) with C comments, but rdoc still generates
rdoc for them. the rb_define_method calls are also commented out.

i.e.

/*
rb_define_method("xxx", ...)
rb_define_method("yyy", ...)
*/

this should not be documented, in my mind, as those methods are going
to be MIA at runtime.

leon
 
T

Tilman Sauerbeck

leon breedt said:
i have some C functions in an extension i'm documenting that are
commented out (disabled) with C comments, but rdoc still generates
rdoc for them. the rb_define_method calls are also commented out.

i.e.

/*
rb_define_method("xxx", ...)
rb_define_method("yyy", ...)
*/

this should not be documented, in my mind, as those methods are going
to be MIA at runtime.

Yeah. atm, rdoc only handles C++ style comments:

(parse_c.rb)

def remove_commented_out_lines
@body.gsub!(%r{//.*rb_define_}, '//')
end

Shouldn't be too hard to make it respect C style comments, too, though
;D
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,163
Latest member
Sasha15427
Top