From: Dave Thomas Date: 2001-05-04T23:27:45+09:00 Subject: [ruby-talk:14638] Re: Yet another "About private methods" question Eric Jacoboni writes: > So my use of 'private', above, don't have the semantic i used to > consider, as anyone is able to call a private method simply by creating > a subclass. It's a philosophical thing. 'private' is an indication that you're not supposed to be using this method outside. However, you can always get around this in Ruby: class Fred def meth puts "private" end private :meth end Fred.new.meth #=> error class Fred public :meth end Fred.new.meth #=> "private" In a language where the source code is always available at runtime, this seems reasonable. If someone wants to ignore a big hint saying "don't do this", then they'll always be able to., and they'll reap whatever trouble they deserve :) Dave