diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-24 18:12:24 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-24 18:12:24 +0000 |
commit | e3215a73423bdfca2ee2a2cae45a616296f0f605 (patch) | |
tree | 9ab7ee75fdacc3dc0f78ff5aa3335b6de6aa6436 /pack.c | |
parent | 8f5b0a4cd4decba7a56d1acb9601db47d2935ec0 (diff) | |
download | ruby-e3215a73423bdfca2ee2a2cae45a616296f0f605.tar.gz |
* pack.c (pack_pack): use NUM2LONG instead of NUM2INT.
* numeric.c (fix_lshift, fix_aref): use SIZEOF_LONG instead of
SIZEOF_VALUE.
* bignum.c (big2ulong, rb_big_aref): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'pack.c')
-rw-r--r-- | pack.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -861,13 +861,13 @@ pack_pack(VALUE ary, VALUE fmt) case 'U': /* Unicode character */ while (len-- > 0) { - long l; + SIGNED_VALUE l; char buf[8]; int le; from = NEXTFROM; from = rb_to_int(from); - l = NUM2INT(from); + l = NUM2LONG(from); if (l < 0) { rb_raise(rb_eRangeError, "pack(U): value out of range"); } |