summaryrefslogtreecommitdiff
path: root/numeric.c
diff options
context:
space:
mode:
Diffstat (limited to 'numeric.c')
-rw-r--r--numeric.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/numeric.c b/numeric.c
index 7d557db74f..8e7e14b89b 100644
--- a/numeric.c
+++ b/numeric.c
@@ -936,6 +936,10 @@ flo_cmp(x, y)
break;
case T_BIGNUM:
+ if (isinf(a)) {
+ if (a > 0.0) return INT2FIX(1);
+ else return INT2FIX(-1);
+ }
b = rb_big2dbl(y);
break;