From: David Masover Date: 2011-01-28T08:06:51+09:00 Subject: Re: why is overloading invalid in ruby. On Thursday, January 27, 2011 02:55:24 pm Ted Flethuseo wrote: > Ah that's too bad... I knew I could put some default values for x and y > and z.. getting the same effect sort of... > > but this isn't a solution if the methods that I want to "overload" (I > call it > overload, not sure what the proper term should be) are > completely different, and are not differentiated simply by different > values. If they're not differentiated by different values, how were you expecting overloading to work? If the problem is that you need the behavior to be different, I think default values still work -- for example: def sum_or_inverse a, b=nil if b.nil? -a else a+b end end But I don't really know what you were asking. I agree with Jesús. We need more details.