summaryrefslogtreecommitdiffstats
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
commitf8bd0bc7e6bbf6122f8011a308d484e6d59a403d (patch)
treedba92fbae42ae519f8c201d001399144d0888ec0 /numeric.c
parentcf9c8f998017f4cdc8cc96ff90862d1e2b166593 (diff)
downloadruby-f8bd0bc7e6bbf6122f8011a308d484e6d59a403d.tar.gz
ruby-f8bd0bc7e6bbf6122f8011a308d484e6d59a403d.tar.xz
ruby-f8bd0bc7e6bbf6122f8011a308d484e6d59a403d.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/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 4adaa6e1d..513b43b48 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;
}