B
Brian Marick
Consider this:
module M1
module M2
class C
puts Module.nesting.inspect
end
end
end
It produces [M1::M2::C, M1::M2, M1], which I expected.
Now try this:
M1::M2::C.class_eval("Module.nesting")
It produces [M1::M2::C], which I did not expect. Why the difference?
Thanks.
VERSION: 1.8.1 and 1.6.8
module M1
module M2
class C
puts Module.nesting.inspect
end
end
end
It produces [M1::M2::C, M1::M2, M1], which I expected.
Now try this:
M1::M2::C.class_eval("Module.nesting")
It produces [M1::M2::C], which I did not expect. Why the difference?
Thanks.
VERSION: 1.8.1 and 1.6.8