From: nobu@... Date: 2015-02-01T03:14:28+00:00 Subject: [ruby-core:67921] [ruby-trunk - Misc #10809] [PATCH 2/2] Add tests for math.c related to [Feature 10785], [Feature 10800] Issue #10809 has been updated by Nobuyoshi Nakada. > ~~~diff > + assert_equal(1.0/0, Math.cbrt(1.0/0)) > ~~~ Isn't it better to use `assert_infinity`? > ~~~diff > + def to_f > + _to_f > + end > ~~~ Why not revert to the original methods? ---------------------------------------- Misc #10809: [PATCH 2/2] Add tests for math.c related to [Feature 10785], [Feature 10800] https://bugs.ruby-lang.org/issues/10809#change-51315 * Author: kazuki tanaka * Status: Open * Priority: Normal * Assignee: Nobuyoshi Nakada ---------------------------------------- Hi! Here are two patches. ## reorder_test_cbrt_and_add_a_assertion.patch: Move Test#test_cbrt to more proper place and add a assertion for Math.cbrt(1.0/0) ## add_test_for_math_c_about_overriding_Integer_to_f.patch: Add tests for [Feature 10785](https://bugs.ruby-lang.org/issues/10785) and [Feature 10800](https://bugs.ruby-lang.org/issues/10800) These two features are merged by Nobuyoshi Nakada san, so I assigned him but please feel free to reassigne. thanks. ---Files-------------------------------- reorder_test_cbrt_and_add_a_assertion.patch (1.19 KB) add_test_for_math_c_about_overriding_Integer_to_f.patch (1.36 KB) -- https://bugs.ruby-lang.org/