Instead of converting the bytes to hex first I just unpacked them:

s.unpack("N")

> 10



-- 
Posted via http://www.ruby-forum.com/.