Even after reading the standard documentation, I still can\'t understand how Ruby\'s Array#pack and String#unpack exactly work. Here is the example that\'s causing me the most t
We were working on a similar problem this morning. If the array size is unknown, you can use:
ary = ["61", "62", "63"] ary.pack('H2' * ary.size) => "abc"
You can reverse it using:
str = "abc" str.unpack('H2' * str.size) => ["61", "62", "63"]