From: Hadmut Danisch Date: 2003-04-24T02:01:00+09:00 Subject: Re: Module inclusion at runtime... Robert Klemme wrote: > You can't. It's locigally impossible since XYZ is part of Monday. I don't think so. As far as I understand Ruby, XYZ is not "part" of Monday. It's still a separate module, it's just that the Constant XYZ in Monday's namespace points to it. > Everybody who wants to use XYZ must know about Monday. No. You just need to get the module object from anywhere and extend. > Apart from that, nesting XZY twice into Monday (once directly and then via > Monday) is at least odd. Maybe you let us know what you are trying to > accomplish and then somebody can come up with a more appropriate solution. Maybe I already found the solution: the method "nesting". Unfortunately, it doesn't work properly for autoloaded modules. I guess it is a bug. > a = aModule.name.split('::') > a.pop > parentName = a.join('::') That's exactly the problem. It works for normal modules (where I don't have a problem), but not with autoloaded nested functions. The name just doesn't show the parents, similar to the nesting function. Hadmut -- Hadmut Danisch http://www.danisch.de