From: Paul Battley Date: 2006-08-18T19:47:24+09:00 Subject: Re: Syntax checker wtf? On 18/08/06, Just Another Victim of the Ambient Morality wrote: > Personally, I don't think there's anything wrong with protecting code > from human error considering how it's written for humans. Ruby still has > access permissions. If Ruby really trusted the programmer, it wouldn't > bother with public and private methods. If you're not supposed to call > that method, then don't call it! It's that simple. That's what Python > does... Ruby does trust the programmer. The privacy screen is very flimsy: class Foo private def dont_call_me puts("I said DON'T CALL ME!") end end f = Foo.new f.dont_call_me # NoMethodError: private method `dont_call_me' called for # f.__send__(:dont_call_me) # I said DON'T CALL ME! Paul.