From: Christoph Date: 2002-09-20T17:41:29+09:00 Subject: Re: Is better to subclass or to add methods to an existing class? "ts" wrote .... > No, no. I've just added modules to kill it :-) > > Another example, what do you expect with ? > > ruby -e 'class A < Array; end; a = A.new; b = A.new; p ((a+b).type)' I would bet on an A object. This behavior is somewhat problematic (see the old "Subrange of String subclass" thread) but I don't see this as a problem of overloading. Anyway I don't think that ``general method overloading'', with the possible exception of operators, is a good idea anyway. Rather, the request of an ``overloaded method call'' should be made explicit - as in <(a,b)>.foo( _not, *overloaded) or a.foo( b; also, _not, overloaded) /Christoph