Hi,

In message "Re: pack("l"), 64 bit question"
    on Thu, 16 Feb 2006 01:50:34 +0900, Daniel Berger <Daniel.Berger / qwest.com> writes:

|Ruby 1.8.4
|Solaris 10
|
|Is this correct?
|
|# 32 bit
|irb(main):002:0> [-1].pack("l")
|=> "\377\377\377\377"
|irb(main):003:0> "\377\377\377\377".unpack("l")
|=> [-1]
|
|# 64 bit
|irb(main):002:0> [-1].pack("l")
|=> "\377\377\377\377"
|irb(main):003:0> "\377\377\377\377".unpack("l")
|=> [4294967295]

Hmm, unpack("l") should have returned negative value unless "_" suffix
is supplied.

							matz.