aboutsummaryrefslogtreecommitdiffstats
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
commitb88dfa10b5be5147c7204dee44ed39880254fd88 (patch)
tree25f526e24dcba285d427d7ca665fa973fd5b410a
parent13dbddbdceb2af94eec96d896115ff0e0c0ea5b3 (diff)
downloadruby-b88dfa10b5be5147c7204dee44ed39880254fd88.tar.gz
* numeric.c (flo_eq): workaround for bcc32's bug.
(ruby-bugs-ja:PR#594) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--numeric.c3
2 files changed, 8 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 8ec8b9221b..1a0757697e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Apr 14 11:29:56 2004 WATANABE Hirofumi <eban@ruby-lang.org>
+
+ * numeric.c (flo_eq): workaround for bcc32's bug.
+ (ruby-bugs-ja:PR#594)
+
Wed Apr 14 10:57:40 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp>
* defines.h: include <net/socket.h> to get fd_set definition in BeOS.
diff --git a/numeric.c b/numeric.c
index 8c28e17079..9b96d1a20d 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;
}