From: Iñaki Baz Castillo on
El Jueves, 3 de Diciembre de 2009, Iñaki Baz Castillo escribió:

> The difference is in the second step, the decoding process, since
> "base64.txt" file is the same using Ruby1.8 or 1.9.

Ok, the issue is fixed by uing "IO.read" rather than "IO.readlines":

- Decode "base64.txt" as a PNG "new_icon.png" file:
--------------------------------------
File.open('new_icon.png', 'wb') do |file|
file << (IO.read('base64.txt').to_s.unpack('m')).first
end
--------------------------------------


--
Iñaki Baz Castillo <ibc(a)aliax.net>