From: James Edward Gray II Date: 2004-10-02T08:09:28+09:00 Subject: Re: String#pack? On Oct 1, 2004, at 5:14 PM, GGarramuno wrote: > I was wondering if there was a method in ruby to obtain the hexadecimal > representation of numbers (ie. fixnum, floats, mainly) in either msb > or in lsb > order. > Basically, I'm kind of looking for the opposite function of > String#unpack(). I'm not 100% sure I understood the question, but does this do what you're after? % ruby -e 'puts "%x" % 123' 7b Hope that helps. James Edward Gray II