il Thu, 3 Jun 2004 01:53:18 +0900, Michael Neumann <mneumann / ntecs.de>
ha scritto::

>Hi,
>
>I know that introducing new syntax into Ruby is probably far from being
>accepted by matz....
>
>Every now and then I accidentially pass an integer to a method and am
>surprised than I get a wrong result. The reason is that the method
>expected floats as arguments and not integers. These kind of bugs are
>very hard to find, IMHO.

Maybe you could use the 'mathn' module?
irb(main):001:0> require 'mathn'
=> true
irb(main):002:0> 1/1
=> 1
irb(main):003:0> 1/2
=> 1/2
irb(main):004:0> 3/2
=> 3/2
irb(main):005:0> 1+ (1/2)
=> 3/2
irb(main):006:0> 1.0+ (1/2)
=> 1.5