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 | 38f53383cb1f4514ec491eb202d04650a3472558 (patch) | |
tree | 9ab7ee75fdacc3dc0f78ff5aa3335b6de6aa6436 /pack.c | |
parent | 484347a8db8edd9db0db3b87c0e0f94243cef419 (diff) | |
download | ruby-38f53383cb1f4514ec491eb202d04650a3472558.tar.gz ruby-38f53383cb1f4514ec491eb202d04650a3472558.tar.xz ruby-38f53383cb1f4514ec491eb202d04650a3472558.zip |
* 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: http://svn.ruby-lang.org/repos/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"); } |