summaryrefslogtreecommitdiff
path: root/bignum.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-06-04 09:56:25 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-06-04 09:56:25 +0000
commit4f127ee34b7eabf7c5816e973448ea5fe11c3310 (patch)
tree5b3442f1fa0f402c91b1f99f98c0bb7254b30d06 /bignum.c
parent14fa51aa0b8d8c6e8ab7210584ce254ec5ea2d50 (diff)
* io.c (rb_io_gets_m): set lastline ($_) even when read line is
nil. [ruby-dev:23663] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6427 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bignum.c')
-rw-r--r--bignum.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bignum.c b/bignum.c
index 31a5f58c24..510860c03c 100644
--- a/bignum.c
+++ b/bignum.c
@@ -982,10 +982,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: