From: Aaron Smith Date: 2007-03-08T01:21:00+09:00 Subject: Re: reading unsigned byte Dale Martenson wrote: > On Mar 7, 9:44 am, warhero wrote: >> >> not sure how to go about debugging this.. > > 'c' extracts a signed integer. 'C' extracts an unsigned integer. > > irb(main):002:0> "\x80".unpack('c').first > => -128 > irb(main):003:0> "\x80".unpack('C').first > => 128 Ha, Duh, as soon as you posted this I caught that in the docs. Thanks. -- Posted via http://www.ruby-forum.com/.