From: wys@... (Clemens Wyss) Date: 2001-05-10T14:40:09+09:00 Subject: [ruby-talk:14936] Re: Polymorphic methods "J J" wrote in : >In C++ you can have polymorphic methods such as > >doIt( String s ) { >... >} > >doIt( Integer i ) { >... >} > >Is there a way to duplicate this behavior without resorting to: > >def doIt( object ) > if object.type == String > ... > elsif object.type == Numeric > ... > end >end > >I'm thinking of instances (for example) where you can create an object Why not make Guy Decoux's (ts) 'generic methods' (see [ruby-talk:10424]) a RCR? Clemens