From: Austin Ziegler Date: 2007-02-16T03:34:06+09:00 Subject: Re: Converting Bytes to a Negative Integer On 2/15/07, Harris Reynolds wrote: > # try converting 7777777 when you already have the bytes > z = "" > [129, 237, 173, 241].each { |e| z << e } > puts to_signed[z.unpack("N").first] The bytes are wrong. The bytes for 7,777,777 in "N" format are [0, 118, 173, 241]. -austin -- Austin Ziegler * halostatue@gmail.com * http://www.halostatue.ca/ * austin@halostatue.ca * http://www.halostatue.ca/feed/ * austin@zieglers.ca