summaryrefslogtreecommitdiff
path: root/bignum.c
diff options
context:
space:
mode:
Diffstat (limited to 'bignum.c')
-rw-r--r--bignum.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bignum.c b/bignum.c
index c2ceca74d8..1dd43df494 100644
--- a/bignum.c
+++ b/bignum.c
@@ -1567,7 +1567,7 @@ rb_big_eq(VALUE x, VALUE y)
volatile double a, b;
a = RFLOAT_VALUE(y);
- if (isnan(a)) return Qfalse;
+ if (isnan(a) || isinf(a)) return Qfalse;
b = rb_big2dbl(x);
return (a == b)?Qtrue:Qfalse;
}