Bertram Scharpf wrote: > Hi, > > Am Donnerstag, 17. Dez 2009, 22:57:30 +0900 schrieb Nicolas Vincent: >> Here's an example : >> BigNum stored in the database : 3232235797 >> Resulting IP : 192.168.1.21 > > Here's one without using pack/unpack: > > ip = 3232235797 > a = [] > 4.times { a.unshift ip & 0xff ; ip >>= 8 } > a.join "." > #=> "192.168.1.21" > > Bertram Hi Bertram, Thanks for your code explaining the underlying theory. Regards, -- Posted via http://www.ruby-forum.com/.