aboutsummaryrefslogtreecommitdiffstats
path: root/sprintf.c
diff options
context:
space:
mode:
Diffstat (limited to 'sprintf.c')
-rw-r--r--sprintf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sprintf.c b/sprintf.c
index 5237b8d2c8..f4aa7f6d1d 100644
--- a/sprintf.c
+++ b/sprintf.c
@@ -875,7 +875,7 @@ rb_str_format(int argc, const VALUE *argv, VALUE fmt)
double fval;
fval = RFLOAT_VALUE(rb_Float(val));
- if (isnan(fval) || isinf(fval)) {
+ if (!isfinite(fval)) {
const char *expr;
int need;
int elen;