summaryrefslogtreecommitdiff
path: root/bignum.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-08-27 10:52:02 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-08-27 12:41:30 +0900
commit04be8e84db1cf4f8b2a7bc7679eda4336da75d43 (patch)
treec7914614f4a5cf91109f7893b87ff9e5d143ad0e /bignum.c
parent37114673623c4d2b1d9f2c2ddfffba070b2d96e6 (diff)
Use C99-defined macros to classify a floating-point number
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4783
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 c954fe6755..939b33ca45 100644
--- a/bignum.c
+++ b/bignum.c
@@ -5382,7 +5382,7 @@ rb_integer_float_eq(VALUE x, VALUE y)
double yd = RFLOAT_VALUE(y);
double yi, yf;
- if (isnan(yd) || isinf(yd))
+ if (!isfinite(yd))
return Qfalse;
yf = modf(yd, &yi);
if (yf != 0)