diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-11-19 08:07:51 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-11-19 08:07:51 +0000 |
commit | 5315f0d66741aa8caca75d30953b35733474bf87 (patch) | |
tree | 00da6cc4c3bf018f949dfcbc5c88f8662fee1480 /bignum.c | |
parent | 710e25422b099e8ce2c13d868effaefa10366378 (diff) | |
download | ruby-5315f0d66741aa8caca75d30953b35733474bf87.tar.gz |
* array.c (rb_ary_zip): iterates over items in the receiver.
zipped with nil if argument arrays are shorter. if arrays are
longer, left items are ignored. now works with blocks.
* enum.c (zip_i): changed for new behavior.
* array.c (rb_ary_transpose): added. [new]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3064 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bignum.c')
-rw-r--r-- | bignum.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -182,8 +182,6 @@ rb_int2inum(n) #ifdef HAVE_LONG_LONG -#define DIGSPERLONGLONG ((unsigned int)(SIZEOF_LONG_LONG/SIZEOF_BDIGITS)) - void rb_quad_pack(buf, val) char *buf; @@ -233,14 +231,14 @@ rb_quad_unpack(buf, sign) } i = 0; - big = bignew(DIGSPERLONGLONG, 1); + big = bignew(DIGSPERLL, 1); digits = BDIGITS(big); - while (i < DIGSPERLONGLONG) { + while (i < DIGSPERLL) { digits[i++] = BIGLO(q); q = BIGDN(q); } - i = DIGSPERLONGLONG; + i = DIGSPERLL; while (i-- && !digits[i]) ; RBIGNUM(big)->len = i+1; |