From: Steven Lumos Date: 2007-06-17T08:37:17+09:00 Subject: Re: new method dispatch rule (matz' proposal) David Flanagan writes: > Daniel DeLorme wrote: >> How is this hidden from subclasses? Or did I miss something? >> > > Sorry, everyone! As Daniel and others have pointed out my analogy of > non-inheritable local methods to instance variables makes no sense > since instance variables are inheritable. I'm feeling pretty > embarassed by that. > > However, I do stand by my argument that it would be good to have some > kind of non-inheritable really-private kind of method in Ruby. And I > think that distinguishing those methods with punctuation in their > names would be an easy way to get there without having to jigger with > the existing method dispatch rules. > > David Maybe I'm confused, which of these are you talking about? class A def m; @f(); end def @f; true; end end class B < A end B.new.m #=> Error: The mighty class author requires that you reimplement @f. or class B < A def @f; false; end #=> Error: The mighty class author forbids you to reimplement @f end Steve