Richard Cole ha scritto:

> 
> It is kind of freaky to have definition of x/y change dependent on 
> whether or not a library is included. One library changing the semantics 
> of the operations defined in another library is side effects on steroids.

yes, and we love that :)
The point of using rational (or complex or mathn  or whatever) is that 
you're slightly changing the language, so for general purpose you don't 
need to support the whole world of chances but you can add them when you 
really need them.

> irb(main):001:0> 1.div(2)
> => 0
> irb(main):002:0> 1/2
> => 0
> irb(main):003:0> require 'mathn'
> => true
> irb(main):004:0> 1/2
> => 1/2
> irb(main):005:0> 1.div(2)
> => 0
> 
> So there are three safe combinations (mathn,/), (mathn,div) (none,div) 
> and one unsafe combination (none,/). It is a pitty that the unsafe 
> combination is the first one that a nieve programmer would go for. Maybe 
> this can be cleaned up in the Ruby 2.0?
> 

see the rcr "make rational a builtin class"
http://rcrchive.net/rcr/show/260