summaryrefslogtreecommitdiff
path: root/bignum.c
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-08-01 01:12:54 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-08-01 01:12:54 +0000
commit6ad3f616638b4bfa9140318897a1e68df5b29eec (patch)
treeaa73012cff6d383eb166561647ca85719056c793 /bignum.c
parentb6f174afdb81f0f0cbe0ff848dddad047d00c40f (diff)
* bignum.c (big_op): comparison of bignum and infinity has returned 1
or -1, but it must return boolean. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bignum.c')
-rw-r--r--bignum.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/bignum.c b/bignum.c
index 24f13403b3..c2ceca74d8 100644
--- a/bignum.c
+++ b/bignum.c
@@ -1453,8 +1453,9 @@ big_op(VALUE x, VALUE y, int op)
double a = RFLOAT_VALUE(y);
if (isinf(a)) {
- if (a > 0.0) return INT2FIX(-1);
- else return INT2FIX(1);
+ if (a > 0.0) rel = INT2FIX(-1);
+ else rel = INT2FIX(1);
+ break;
}
rel = rb_dbl_cmp(rb_big2dbl(x), a);
break;