>>90-91
puts eval(str.inspect.gsub(/\\(?=#[$@{])/n, ''))

inspectとevalはできるかぎり逆変換になることが期待されるので、
今のほうが本来意図された動作。