From: Alexandre Mutel Date: 2009-11-26T23:53:42+09:00 Subject: Module.nesting strangeness Hi, i'm encountering a weird behavior of the Module.nesting methodd. Here is my testcase from the irb: ____________________________ class A class B def test() puts "Module.nesting : " + Module.nesting * "," end end end => nil b = A::B.new => # b.test Module.nesting : A::B,A => nil b.instance_eval { puts "Module.nesting : " + Module.nesting * "," } Module.nesting : => nil ____________________________ The documentation says : "Returns the list of Modules nested at the point of call. ". But how Module.nesting in test() method knows that it was declared inside the class A/classB and not outside? -- Posted via http://www.ruby-forum.com/.