F
Francis Cianfrocca
All:
The following:
p [9999].pack("w")
gives:
"\316\017"
but I expected to get:
"\047\017"
Notice the correct bit pattern for the upper octet (100111) appears in
the octet generated by Ruby (11001110) but shifted and with an extra
bit at the top. Is this a bug in pack("w"), or is my expectation
wrong?
Thanks,
-f
The following:
p [9999].pack("w")
gives:
"\316\017"
but I expected to get:
"\047\017"
Notice the correct bit pattern for the upper octet (100111) appears in
the octet generated by Ruby (11001110) but shifted and with an extra
bit at the top. Is this a bug in pack("w"), or is my expectation
wrong?
Thanks,
-f