summaryrefslogtreecommitdiff
path: root/numeric.c
diff options
context:
space:
mode:
authoreban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-04-14 06:05:41 +0000
committereban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-04-14 06:05:41 +0000
commit3a9fcc9a96c5d1c2266d61d6f2169ea10655d792 (patch)
treedba92fbae42ae519f8c201d001399144d0888ec0 /numeric.c
parentda011c8311088ee53a791e4d31bf6b6c4fa96db5 (diff)
* numeric.c (flo_eq): workaround for bcc32's bug.
(ruby-bugs-ja:PR#594) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6159 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'numeric.c')
-rw-r--r--numeric.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/numeric.c b/numeric.c
index 4adaa6e1d4..513b43b48c 100644
--- a/numeric.c
+++ b/numeric.c
@@ -842,6 +842,9 @@ flo_eq(x, y)
return num_equal(x, y);
}
a = RFLOAT(x)->value;
+#if defined __BORLANDC__
+ if (isnan(a) || isnan(b)) return Qfalse;
+#endif
return (a == b)?Qtrue:Qfalse;
}