diff options
Diffstat (limited to 'bignum.c')
-rw-r--r-- | bignum.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -966,10 +966,11 @@ rb_big_eq(x, y) break; case T_FLOAT: { - double a, b; + volatile double a, b; a = RFLOAT(y)->value; b = rb_big2dbl(x); + if (isnan(a) || isnan(b)) return Qfalse; return (a == b)?Qtrue:Qfalse; } default: |