或者尝试下这个:
"666f6f626172".gsub(/../) { |pair| pair.hex.chr } # => "foobar"
Tencent · Content Operation (已认证)