aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--bignum.c6
2 files changed, 9 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index a9f8874b46..601d8c1aff 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Sun Nov 24 22:24:19 2013 Tanaka Akira <akr@fsij.org>
+
+ * bignum.c (bigxor_int): Apply BIGLO for long in a BDIGIT expression.
+ (bigor_int): Ditto.
+ (bigand_int): Ditto.
+
Sun Nov 24 18:13:23 2013 Tanaka Akira <akr@fsij.org>
* include/ruby/defines.h (SIZEOF_ACTUAL_BDIGIT): Defined.
diff --git a/bignum.c b/bignum.c
index 3f8821a3f4..6c2cda3937 100644
--- a/bignum.c
+++ b/bignum.c
@@ -6445,7 +6445,7 @@ bigand_int(VALUE x, long xn, BDIGIT hibitsx, long y)
#if SIZEOF_BDIGITS >= SIZEOF_LONG
i = 1;
- zds[0] = xds[0] & y;
+ zds[0] = xds[0] & BIGLO(y);
#else
for (i=0; i < xn; i++) {
if (y == 0 || y == -1) break;
@@ -6551,7 +6551,7 @@ bigor_int(VALUE x, long xn, BDIGIT hibitsx, long y)
#if SIZEOF_BDIGITS >= SIZEOF_LONG
i = 1;
- zds[0] = xds[0] | y;
+ zds[0] = xds[0] | BIGLO(y);
if (i < zn)
goto y_is_fixed_point;
goto finish;
@@ -6674,7 +6674,7 @@ bigxor_int(VALUE x, long xn, BDIGIT hibitsx, long y)
#if SIZEOF_BDIGITS >= SIZEOF_LONG
i = 1;
- zds[0] = xds[0] ^ y;
+ zds[0] = xds[0] ^ BIGLO(y);
#else
for (i = 0; i < xn; i++) {
zds[i] = xds[i] ^ BIGLO(y);