rdoc bug with 'class M::C' syntax

  • Thread starter Joel VanderWerf
  • Start date
J

Joel VanderWerf

I wonder if anyone else has seen this with the recent CVS of Rdoc. It
wasn't happening as recently as 28 May 2003, but with the 23 Sep 2003
CVS, using M::C when M is in a required file causes a problem.

==== a.rb ====
require './m'
# module M; end # this prevents the problem

class M::C
def foo; end
end
==============

==== b.rb ====
module M; end
==============

The rdoc commands I tried are:

$ rdoc b.rb a.rb

b.rb: m
a.rb: c
a.rb:4:9: Couldn't find module M
/usr/local/lib/ruby/site_ruby/1.8/rdoc/parsers/parse_rb.rb:1737:in
`parse_class': undefined method `add_class' for nil:NilClass (NoMethodError)
....

$ rdoc a.rb b.rb

a.rb: c
a.rb:4:9: Couldn't find module M
/usr/local/lib/ruby/site_ruby/1.8/rdoc/parsers/parse_rb.rb:1737:in
`parse_class': undefined method `add_class' for nil:NilClass (NoMethodError)
....

Both of these work fine with the older CVS.
 

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

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top