In many languages there's a pair of functions,
ord(), which convert between numbers and character values. In some languages,
ord() is called
Integer#chr, which works great:
>> 65.chr A
Fair enough. But how do you go the other way?
"A".each_byte do |byte| puts byte end
and that's pretty close to what I want. But I'd really rather avoid a loop — I'm looking for something short enough to be readable when declaring a