From: J J Date: 2001-05-08T03:10:04+09:00 Subject: [ruby-talk:14793] Polymorphic methods 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 from several different objects passed to the constructor. E.g. m = Month.new(12) m = Month.new('December') m = Month.new(anotherMonth) thus, Month.initialize has to have a case or if statement. Thanks in advance! JJ -- Be Kind, Be Careful, Be Yourself -- Solid, reliable software at reasonable prices http://www.johnjohnsonsoftware.com