From: Dave Thomas Date: 2001-02-01T03:55:43+09:00 Subject: [ruby-talk:10183] Re: Require loops harryo@zipworld.com.au (Harry Ohlsen) writes: > I've written a number of numeric types that I want to be able to use > anywhere I could a Fixnum or Float. So, I've written code for each of > +, -, * and / that check what the type of the "other" argument is and > do appropriate things. There's a built-in mechanism called 'coerce' that might do what you want. There's an example at http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/~poffice/mail/ruby-talk/9587 Regards Dave