From: Dave Thomas Date: 2003-10-05T07:40:31+09:00 Subject: Re: rdoc bug with 'class M::C' syntax On Saturday, Oct 4, 2003, at 16:37 US/Central, Joel VanderWerf wrote: > > 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 > In the past, RDoc didn't bother to look for the actual definition of modules, but now it does. However, it also does not actually execute your program, so it doesn't perform the require, and hence doesn't load up module 'M' before you then use it later in the code. There are two fixes: in the short term, simply put the file containing the definition of M earlier in the command line to RDoc. When I get a chance I'll fix RDoc to dummy up the module M in this case automatically. Cheers Dave