summaryrefslogtreecommitdiff
path: root/random.c
diff options
context:
space:
mode:
Diffstat (limited to 'random.c')
-rw-r--r--random.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/random.c b/random.c
index 5663f87be2..232fe3e6f5 100644
--- a/random.c
+++ b/random.c
@@ -1348,7 +1348,7 @@ static inline double
float_value(VALUE v)
{
double x = RFLOAT_VALUE(v);
- if (isinf(x) || isnan(x)) {
+ if (!isfinite(x)) {
domain_error();
}
return x;