On Jan 31, 2011, at 5:16 AM, Shadowfirebird wrote:
> Or, indeed, the practical case - at the very heart of Ruby is the idea =
of duck typing.  Duck typing rules out method overloading, because =
parameters would have to have set types before you could have a =
signature.  Presumably no-one is suggesting that we should have fixed =
typing in Ruby?
>=20

I think the original poster provided an example of overloading based on =
the number of parameters but not their type.
Even restricting yourself to overloading by arity is a bit problematic =
in Ruby because the arity still has to be determined (in some cases) =
dynamically:

args =3D [1,2]
foo(*args)      # two arguments
args << 3
foo(*args)      # three arguments

Gary Wright