From: Peter Vanbroekhoven Date: 2005-08-29T23:06:07+09:00 Subject: Re: Method behaves differently when called using #send On Mon, 29 Aug 2005, David A. Black wrote: > But look at the error message: > > irb(main):003:0> 1.puts > NoMethodError: private method `puts' called for 1:Fixnum > > It's contradictory: "no method", but "private method called". "No > method" really doesn't describe the situation. Perhaps no *response*, > but not no method. I agree that the error message is contradictory. At least that can be remedied by simply changing the error message. I have to admit though that personally I'd like to see private methods (as they are now) go and have them replaced by a kind of 'local methods' (which could still be called using send or send! or whatever). Local methods would go in a separate namespace, so for anyone outside that namespace it would be as if the method is not there. It trades accessibility for visibility. Accessibility in Ruby sometimes seems a bit useless because it's way too easy to circumvent. Visibility would not even try to restrict access, you just need the right pair of glasses to see the 'private/local methods'. But that's a completely different discussion ;-) Peter