From: Ryan Davis Date: 2010-12-23T07:28:52+09:00 Subject: Re: write byte array to file On Dec 22, 2010, at 14:18 , Aegorov Egorov wrote: > i'm get error > undefined method `chr' for "255":String (NoMethodError) > with this code > > File.open( filename, 'wb' ) do |output| > new_array.each do | byte | > output.print byte.chr > end > end you have an array of strings of numbers: [ "255" ].each do |not_a_byte| ... end