Alexis Alulema wrote:
> File.open('E:\\UpdatePackage\\Materials\\coco2.jpg', 'w' ) do |output|
>      a.each do | byte |
>           output.print byte.chr
>      end
> end

Open the file with "wb"'.
-- 
Posted via http://www.ruby-forum.com/.