Skip to content

Instantly share code, notes, and snippets.

@blizzarddreams
Created December 27, 2015 17:10
Show Gist options
  • Select an option

  • Save blizzarddreams/1d2a488f4ae39effa8ec to your computer and use it in GitHub Desktop.

Select an option

Save blizzarddreams/1d2a488f4ae39effa8ec to your computer and use it in GitHub Desktop.
require "zlib"
require "open-uri"
url = "https://cache.ruby-lang.org/pub/ruby/ruby-2.1.2.zip"
file_name = "ruby.zip"
#File.open(file_name, "wb") { |file| file.write(open(url).read) }
z = Zlib::Inflate.inflate(File.open(file_name, "rb").read)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment