From: Vianney Lecroart Date: 2007-10-26T00:19:42+09:00 Subject: Re: read write integer in binary into a file It seems that the marshaling of a number doesn't give a 4 bytes: irb(main):036:0> mynum => 56515 irb(main):037:0> [mynum].pack("i") => "\303\334\000\000" irb(main):038:0> Marshal.dump(mynum) => "\004\bi\002\303\334" -- Posted via http://www.ruby-forum.com/.