diff options
author | tadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-09-17 01:55:49 +0000 |
---|---|---|
committer | tadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-09-17 01:55:49 +0000 |
commit | 41114caa4fb3ebed8d7acc47caf922b3d4ad75fa (patch) | |
tree | 13b7db3fe51cdd297af9ffac6b16d9f22d7999c9 /rational.c | |
parent | 1fdd248a82f5c2773ffd7781b02794d3310196d9 (diff) |
revertd.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'rational.c')
-rw-r--r-- | rational.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/rational.c b/rational.c index a572dceb11..53bc11c4ef 100644 --- a/rational.c +++ b/rational.c @@ -950,19 +950,8 @@ nurat_div(VALUE self, VALUE other) other, ONE, '/'); } } - else if (RB_TYPE_P(other, T_FLOAT)) { - { - double x = RFLOAT_VALUE(other), den; - get_dat1(self); - - if (isnan(x)) return DBL2NUM(NAN); - if (isinf(x)) return INT2FIX(0); - if (x != 0.0 && modf(x, &den) == 0.0) { - return rb_rational_raw2(dat->num, f_mul(rb_dbl2big(den), dat->den)); - } - } + else if (RB_TYPE_P(other, T_FLOAT)) return rb_funcall(f_to_f(self), '/', 1, other); - } else if (RB_TYPE_P(other, T_RATIONAL)) { if (f_zero_p(other)) rb_raise_zerodiv(); |