[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

rdoc bug with 'class M::C' syntax

Joel VanderWerf

10/4/2003 9:38:00 PM


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.