Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
IO.copy_stream with Zlib::GZipWriter broken in 184.108.40.206 and up #4202
In 220.127.116.11 and above, calling
I suspect it may have come from 9167f3a.
require 'tempfile' require 'zlib' require 'pry' infile = Tempfile.new("copy_stream") infile << "Test content" outfile = Tempfile.new("copy_stream") Zlib::GzipWriter.open(outfile.path) do |gz| IO.copy_stream(infile.path, gz) end
Works on 18.104.22.168 and 22.214.171.124. Fails on 126.96.36.199, 188.8.131.52 and 184.108.40.206.
For future reference, you can narrow down an exception even more by passing
So the actual bug here was that our
MRI does not do this. Instead of having a