From: nobuyoshi nakada Date: 2005-06-29T10:46:23+09:00 Subject: Re: hexlify and unhexlify Hi, At Wed, 29 Jun 2005 09:46:59 +0900, Jonas Galvez wrote in [ruby-talk:146716]: > Is there any built-in module that does this for me? > > def hexlify(msg) msg.unpack("H*")[0] > end > def unhexlify(msg) [msg].pack("H*") > end > > puts hexlify("In Ruby...") > puts unhexlify("496e20527562792e2e2e") -- Nobu Nakada