summaryrefslogtreecommitdiff
path: root/bignum.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-07-25 07:08:14 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-07-25 07:08:14 +0000
commitf65273b4191230447bc7aa8feeaa252b9a2fa60c (patch)
tree7f0a3ae50907e6732cbb438fc5e1ee2b5be6bf8b /bignum.c
parentb535e9b004097dd567a7c6d461a5b224bbf47991 (diff)
* bignum.c (rb_big_eq): reduce isnan(). [ruby-dev:26600]
* numeric.c (flo_eq, flo_gt, flo_ge, flo_lt, flo_le): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8831 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 c5154dbe13..3d11efa8c4 100644
--- a/bignum.c
+++ b/bignum.c
@@ -983,8 +983,8 @@ rb_big_eq(x, y)
volatile double a, b;
a = RFLOAT(y)->value;
+ if (isnan(a)) return Qfalse;
b = rb_big2dbl(x);
- if (isnan(a) || isnan(b)) return Qfalse;
return (a == b)?Qtrue:Qfalse;
}
default: