Devin Mullins ha scritto:
> Trans wrote:
> 
>> Hi All--
>>
>> I know there are plans to give Ruby private instance variables, but I'm
>> wondering if there are any plans to provide the corresponding type of
>> thing for methods, i.e. local instance methods. To clarify, a local
>> instance method is a method that does not participate in the
>> inheritance chain and is only callable from within the class it is
>> defined.
>>  
>>
> That's interesting... what's a use case for that?
> 

I guess the point would be to avoid breaking something when inheriting, 
i.e. if you have an helper method named #foo which you don't publish 
since it's just used internally, a subclass in the need for a method 
#foo could redefine it and cause breakage of inherited methods that used 
to rely on the former behaviour.
Thus, everyone subclassing would need to know the internals of evry 
ancestor class to avoid problems.

I think you can do this via unbinding/rebinding a method but it is ugly.

I'd like for private methods to behave this way.