rdoc bug?

J

Jamis Buck

I'm using:

$ ruby -v
ruby 1.8.2 (2004-07-29) [i686-linux]

RDoc does not seem to be picking up modules defined with
"rb_define_modules_under". The following patch fixes it--has this
already been addressed?

(BTW: I'm not sure if there is a better way to fix the problem or not,
but this does fix it, for me.)

--- /usr/lib/ruby/1.8/rdoc/parsers/parse_c.rb 2004-09-08
16:50:10.335660536 -0600
+++ fixed_parse_c.rb 2004-09-08 16:50:36.354705040 -0600
@@ -271,10 +271,10 @@
end

@body.scan(/(\w+)\s* = \s*rb_define_module_under
- \(
+ \s*\(
\s*(\w+),
\s*"(\w+)"
- \)/mx) do
+ \s*\)/mx) do

|var_name, in_module, class_name|
handle_class_module(var_name, "module", class_name, nil,
in_module)

--
Jamis Buck
(e-mail address removed)
http://www.jamisbuck.org/jamis

"I use octal until I get to 8, and then I switch to decimal."
 
D

Dave Thomas

RDoc does not seem to be picking up modules defined with
"rb_define_modules_under". The following patch fixes it--has this
already been addressed?

RDoc's parsing of C assumed a style similar to the Ruby core, with no
extra spaces before and after method parameter lists. Thanks to your
patch, it now does.



Cheers

Dave
 

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

Similar Threads


Members online

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top