From: ara.t.howard@... Date: 2007-02-06T05:23:49+09:00 Subject: [RCR] Module#nesting (NOT the class method - instance method) harp:~ > cat a.rb class Module def nesting parent, child = nil name.split('::').inject(Object){|parent, child| parent.const_get child} Object == parent ? nil : parent end end class A class B class C class D end end end end p A.nesting p A::B.nesting p A::B::C.nesting p A::B::C::D.nesting harp:~ > ruby a.rb nil A A::B A::B::C -a -- we can deny everything, except that we have the possibility of being better. simply reflect on that. - the dalai lama