From: Florian Gross Date: 2004-10-04T06:14:54+09:00 Subject: Re: Module visibility Giulio Piancastelli wrote: > Yes, but the problem is that I was able to call A3.g from outside the > module even if it was declared private. Why is that happening? Private > symbols in a module are private in respect to... what? Interesting -- this is another difference between module_function without arguments and extend self: module A3 extend self def f; g; end private def g; "A3.g"; end end A3.g # raises NoMethodError: private method `g' called for A3:Module A3.f # => "A3.g" I think the behavior of extend self is more appropriate than the module_function one. > Regards, > Giulio Piancastelli More regards, Florian Gross