From: Simon Strandgaard Date: 2004-04-13T07:49:14+09:00 Subject: Re: Two different results for Module.nesting On Tue, 13 Apr 2004 07:15:58 +0900, Brian Marick wrote: > Consider this: [snip] > It produces [M1::M2::C], which I did not expect. Why the difference? Quoted form RI "Returns the list of +Modules+ nested at the point of call." The 'puts' occurs at 3 levels of nesting. There is no modules surrounding 'p'.. Does that help ? server> ruby -v ruby 1.9.0 (2004-04-06) [i386-freebsd5.1] server> ruby a.rb [M1::M2::C, M1::M2, M1] [M1::M2::C] server> expand -t2 a.rb module M1 module M2 class C puts Module.nesting.inspect end end end p M1::M2::C.class_eval("Module.nesting") server> -- Simon Strandgaard