title: How do i write a string containing an array of integers to a file as bytes in Ruby?
body: <p>How do I write (raw) a binary string array representation to a file?</p>
  
  <pre><code>#str is a String not an Array
  str = "[80, 75, 3, 4, 10, 0, 0, 0, 0, 0, -74, 121, 57, 64, 0, 0, 0, 0]"
  
  File.open('/Users/file.zip', "wb") do |file|
     file.write(str)
  end
  </code></pre>
  
  <p>The code above does not work. How can I to fix it?</p>