From: Gregory Brown Date: 2007-01-16T15:54:29+09:00 Subject: Re: How to realize method/function overloading in Ruby? On 1/16/07, Gregory Brown wrote: > > def do_something_with_array(a) > > # assume a is an array > > end > > def do_something_with_hash(h) > > # assume h is a hash > > end > > def do_something_with_int(i) > > # assume i is an int > > end > > def do_something(a) > send("do_something_with_#{a.class.name.downcase}" > end >