summaryrefslogtreecommitdiff
path: root/numeric.c
diff options
context:
space:
mode:
authorwyhaines <wyhaines@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-14 15:05:27 +0000
committerwyhaines <wyhaines@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-14 15:05:27 +0000
commit63714e935a836313b16dce0e3036b747a1128d0e (patch)
treea08e35aba73c6348f68840431729e6a57aade718 /numeric.c
parent919887813900fa61026f072a5cbcfd7ad873ea97 (diff)
Fixes to bignum/numeric so that infinity is always greater than any num.
configure.in fixes to earlier breakage regarding using $libdir for determining lib dirs, instead of $prefix/lib. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@24107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 21a4f2af4c..c5e64c9b99 100644
--- a/numeric.c
+++ b/numeric.c
@@ -933,6 +933,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;