[ruby-core:68325] [Ruby trunk - Feature #10909] [Open] [PATCH 2/2] math.c: Direct casting from Rational to double.

From: mail@...
Date: 2015-02-26 12:42:34 UTC
List: ruby-core #68325
Issue #10909 has been reported by gogo tanaka.

----------------------------------------
Feature #10909: [PATCH 2/2] math.c: Direct casting from Rational to double.
https://bugs.ruby-lang.org/issues/10909

* Author: gogo tanaka
* Status: Open
* Priority: Normal
* Assignee: 
----------------------------------------
Hi, this proposal is continued from [Feature 10800](https://bugs.ruby-lang.org/issues/10800) and [Feature 10785](https://bugs.ruby-lang.org/issues/10785)
I'd like to do cast from Rational to double unless Rational#to_f is redefined.
Along with that, I've introduced some new macros(`fix2dbl_without_to_f`, `big2dbl_without_to_f`, ..) and added test cases.

Please feel free to let me know if there are something you don't like.

thanks.

---Files--------------------------------
direct_casting_from_Rational_to_double.patch (1.45 KB)
add_tests_to_test_math_rb.patch (1.79 KB)


-- 
https://bugs.ruby-lang.org/

In This Thread

Prev Next