From: dblack@... Date: 2002-12-27T16:48:49+09:00 Subject: Re: 1210 / 100 = 12? what? Hi -- On Fri, 27 Dec 2002, Tom Sawyer wrote: > On Thursday 26 December 2002 11:44 pm, Milan Maksimovic wrote: > > Hey, no reason for panic. > > > > class Fixnum > > def / ( rightSide ) > > return self.to_f / rightSide > > end > > end > > > > puts "#{1210 / 100}" --> 12.1 > > now THAT's what i love about ruby! > > very nice solution :-) Be careful with it, though, as it changes the behavior globally and might cause unexpected behavior in libraries you use (or in other people's code if they use a library where you've done this). David -- David Alan Black home: dblack@candle.superlink.net work: blackdav@shu.edu Web: http://pirate.shu.edu/~blackdav