summaryrefslogtreecommitdiff
path: root/bignum.c
diff options
context:
space:
mode:
Diffstat (limited to 'bignum.c')
-rw-r--r--bignum.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/bignum.c b/bignum.c
index 123eca7403..2f8ab20e32 100644
--- a/bignum.c
+++ b/bignum.c
@@ -1233,10 +1233,10 @@ rb_big2dbl(VALUE x)
if (isinf(d)) {
rb_warning("Bignum out of Float range");
- if (signbit(d))
- d = -HUGE_VAL;
+ if (d < 0.0)
+ d = -HUGE_VAL;
else
- d = HUGE_VAL;
+ d = HUGE_VAL;
}
return d;
}