On 15-Jan-07, at 8:29 AM, w wg wrote:

> Hi
> I' m using unpack to convert 4 bytes to local integer, but ruby just
> supply the "N" modifer  which means unsigned long integer.
>
> My questions is :
> How to unpack 4 bytes to a signed integer ?


There are "i" and "I" for signed and unsigned integer respectively,  
which deals in the local size of integer.

Hope this helps,

Mike

-- 

Mike Stok <mike / stok.ca>
http://www.stok.ca/~mike/

The "`Stok' disclaimers" apply.