From: Daniel Martin Date: 2007-07-13T22:22:56+09:00 Subject: Re: convert ASCII to byte an vice versa chen li writes: > Hi all, > > I have a small script as follows. I wonder how I can > change 65 66 67 back to ABC. In addition to manually using Integer.chr, you may find Array.pack useful: esau:~$ irb irb(main):001:0> 'asdf'.unpack('c*') => [97, 115, 100, 102] irb(main):002:0> [97, 115, 100, 102].pack('c*') => "asdf" -- s=%q( Daniel Martin -- martin@snowplow.org puts "s=%q(#{s})",s.to_a.last ) puts "s=%q(#{s})",s.to_a.last