summaryrefslogtreecommitdiffstats
path: root/numeric.c
diff options
context:
space:
mode:
authoreban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-04-14 02:32:15 +0000
committereban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-04-14 02:32:15 +0000
commitd14158a7543671d24819dd39fa1ded0e8ce08d89 (patch)
tree25f526e24dcba285d427d7ca665fa973fd5b410a /numeric.c
parentc66b809cbbd347a59d85d880b0f35f9d7c5ef423 (diff)
downloadruby-d14158a7543671d24819dd39fa1ded0e8ce08d89.tar.gz
ruby-d14158a7543671d24819dd39fa1ded0e8ce08d89.tar.xz
ruby-d14158a7543671d24819dd39fa1ded0e8ce08d89.zip
* numeric.c (flo_eq): workaround for bcc32's bug.
(ruby-bugs-ja:PR#594) git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@6157 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 8c28e1707..9b96d1a20 100644
--- a/numeric.c
+++ b/numeric.c
@@ -843,6 +843,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;
}