Skip to content

Instantly share code, notes, and snippets.

@notblizzard
Created December 27, 2015 17:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save notblizzard/1d2a488f4ae39effa8ec to your computer and use it in GitHub Desktop.
Save notblizzard/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