From: matz@... (Yukihiro Matsumoto) Date: 2000-10-16T14:15:45+09:00 Subject: [ruby-talk:5561] Re: Problem with pack on 64-bit machines Hi, In message "[ruby-talk:5554] Problem with pack on 64-bit machines" on 00/10/16, Wes Nakamura writes: |I think I've found a problem with ruby 1.6.1 (non-cvs) Array#pack when |on a 64-bit machine (in this case, an alpha running linux, so it's |64-bit little-endian). | |e.g.: | |>> [1].pack "N" |=> "\000\000\000\000" |>> [0x0102030405060708].pack "N" |=> "\001\002\003\004" |>> [0x0000000001020304].pack "N" |=> "\000\000\000\000" Thank you. I found two bugs. * offset shoule be applied for network byteorder, even on little endien machines. * integer size should be checked even for unsigned integers. I think I fixed this. Try the latest CVS, or soon releasing 1.6.2. Thank you again. matz. p.s. I also appreciate the staffs in the Unversity of Tokyo, who supplied me an account to Alpha Linux machine.