From: Devin Mullins Date: 2006-12-04T12:42:23+09:00 Subject: Re: method overloading like Java? Daniel Finnie wrote: > I don't want to do this: > def foo(arg) > if arg.type_of? String > # do something > elsif arg.type_of? Numeric > #do something > else > raise args error > end > end 1. That's the only way to do it. 2. You'd be better served if you considered code like that a smell. If you've got a method whose functionality varies _vastly_ based on the type of its arguments, then they probably deserve to be separate methods, with more descriptive names. Devin