title: Zipfile download through CURL to an actual Zip-file in your file structure
body: <p>I am trying to build a file downloader with the RubyGem Curb. (Look at <a href="https://stackoverflow.com/questions/5382149/using-gem-curb-curl-to-download-file">This Question</a>.)</p>
  
  <p>I am trying to download a zip file and then with the class File I am trying to actually make the file so that I can double click it in Finder (I am on OS X). How would I go about to convert this "Curl'ed" body to a zip-file.</p>
  
  <pre><code>require 'rubygems'
  require 'curb'
  
  class Download
    def start
      curl = Curl::Easy.new('http://wordpress.org/latest.zip')
      curl.perform
      curl.on_body {
        |d| f = File.new('test.zip', 'w') {|f| f.write d}
      }
    end
  end
  
  dl = Download.new
  dl.start
  </code></pre>
  
  <p>I am not getting any error, neither can I find any file. I have tried absolute paths with no difference.</p>