Srdjan Marinovic wrote:
> hi,
> 
> How do I construct a string out of hex values?
> In other words I want to give exact hex value for each byte in the
> string. So I would have soemthing like
> 
> 0x2a, 0x7e, 0x0a, 0x7e
> 
> If I go through Fixnum I get my string to contain numbers 48, 115, 10,
> 115 but I do not want that but rather a string of ASCII(48),
> ACII(115),...
> 
> Thanks
> 
> srdjan

irb(main):001:0> p = "\x2a\x7e\x0a\x7e"
=> "*~\n~"
irb(main):002:0>

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