Array#pack problem on OS X

Hi,

I get the following using Ruby 1.8 preview 3

irb(main):001:0> [65].pack(‘S’)
=> “\000A”
irb(main):002:0> [65].pack(‘v’)
=> “A\000”
irb(main):003:0> [65].pack(‘n’)
=> “\000A”

Thanks for the data points. FYI, [65].pack(‘S’) on my Win98 Ruby 1.6.7 and
on my RH 8.0 Ruby 1.7.3 both produce “A\000”. Until this is sorted out,
I’ll upgrade on my OS X machine to 1.8 and switch my pack(‘S’) 's to
pack(‘v’) 's.

Barry

···

Add photos to your messages with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail