summaryrefslogtreecommitdiff
path: root/bignum.c
diff options
context:
space:
mode:
Diffstat (limited to 'bignum.c')
-rw-r--r--bignum.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/bignum.c b/bignum.c
index 839a866ae9..592c8f88ce 100644
--- a/bignum.c
+++ b/bignum.c
@@ -1616,14 +1616,7 @@ rb_big_eq(VALUE x, VALUE y)
case T_BIGNUM:
break;
case T_FLOAT:
- {
- volatile double a, b;
-
- a = RFLOAT_VALUE(y);
- if (isnan(a) || isinf(a)) return Qfalse;
- b = rb_big2dbl(x);
- return (a == b)?Qtrue:Qfalse;
- }
+ return rb_big_float_cmp(x, y) == INT2FIX(0) ? Qtrue : Qfalse;
default:
return rb_equal(y, x);
}