Closed simonratner closed 11 years ago
Don't I feel stupid! ;-)
Thanks for catching this. It's been fixed and will be in the 2.1.0 release. Note I conditioned the use of the fixed core extension to RUBY_VERSION < '1.9'.
Please let me know if there's anything else I can do to improve Radix.
Firstly, the patch to Float#to_r that this module applies is broken. https://github.com/rubyworks/radix/blob/master/lib/radix/rational.rb#L199
This results in some rather amusing bugs, such as Rational(0.71) == (71/20).
Secondly, ruby 1.9+ provides a native, and more correct, implementation of Float#to_r, so it should not be patched at all.