summaryrefslogtreecommitdiffstats
path: root/bignum.c
diff options
context:
space:
mode:
Diffstat (limited to 'bignum.c')
-rw-r--r--bignum.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/bignum.c b/bignum.c
index 0d7fe2bcd..4642bb538 100644
--- a/bignum.c
+++ b/bignum.c
@@ -1981,7 +1981,7 @@ static VALUE big_shift(VALUE x, int n)
/*
* call-seq:
- * big.fdiv(numeric) -> float
+ * big.fdiv(numeric) -> float
*
* Returns the floating point result of dividing <i>big</i> by
* <i>numeric</i>.
@@ -2383,8 +2383,8 @@ rb_big_lshift(VALUE x, VALUE y)
y = rb_to_int(y);
}
- if (neg) return big_rshift(x, shift);
- return big_lshift(x, shift);
+ x = neg ? big_rshift(x, shift) : big_lshift(x, shift);
+ return bignorm(x);
}
static VALUE
@@ -2410,7 +2410,7 @@ big_lshift(VALUE x, unsigned long shift)
num = BIGDN(num);
}
*zds = BIGLO(num);
- return bignorm(z);
+ return z;
}
/*
@@ -2449,8 +2449,8 @@ rb_big_rshift(VALUE x, VALUE y)
y = rb_to_int(y);
}
- if (neg) return big_lshift(x, shift);
- return big_rshift(x, shift);
+ x = neg ? big_lshift(x, shift) : big_rshift(x, shift);
+ return bignorm(x);
}
static VALUE
@@ -2493,7 +2493,7 @@ big_rshift(VALUE x, unsigned long shift)
if (!RBIGNUM_SIGN(x)) {
get2comp(z);
}
- return bignorm(z);
+ return z;
}
/*