From: Malte Milatz Date: 2005-08-29T22:31:22+09:00 Subject: Re: Method behaves differently when called using #send David A. Black wrote: > irb(main):008:0> class C; def x; 1; end; private :x; end => C > irb(main):009:0> class C; def method_missing(m); p m; end; end => nil > irb(main):010:0> C.new.x > :x > should give a "private method 'x'" error. > > Then again, that's actually a NoMethodError.... Maybe it should be a > UnavailableMethodError or something. In my opinion, an object shouldn't tell others about its internals unless explicitly asked. So a NoMethodError is OK IMHO. Consequently, I agree with the current behavior calling method_missing here. Malte