General

Profile

bugmenot123 (DoNot BugMe)

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 0 1 1

Activity

09/23/2013

07:05 PM Ruby Bug #8935: Zlib::GzipWriter.new with block truncates output to 20 corrupted bytes
Whoa. Has that always been the case? Cause I'm pretty sure I saw this code used somewhere else too.
The problem with .open, which definitely takes a block, is that it only works with file names, not IO objects and thus not StringIO. B...
bugmenot123 (DoNot BugMe)

09/22/2013

07:26 AM Ruby Bug #8935: Zlib::GzipWriter.new with block truncates output to 20 corrupted bytes
Come to think of it, 20 bytes seems like what the gzip header + footer would take up... bugmenot123 (DoNot BugMe)
12:33 AM Ruby Bug #8935: Zlib::GzipWriter.new with block truncates output to 20 corrupted bytes
Sorry, another try without any formatting:
#!/usr/bin/ruby -w
require "zlib"
require "stringio"
input = File.read "/dev/urandom", 200
# corrupted and only 20 bytes long:
out1 = Zlib::GzipWriter.new(StringIO.new){ |gz| g...
bugmenot123 (DoNot BugMe)
12:31 AM Ruby Bug #8935 (Closed): Zlib::GzipWriter.new with block truncates output to 20 corrupted bytes
=begin
(({Zlib::GzipWriter.new})) with block truncates output to 20 corrupted bytes.
#!/usr/bin/ruby -w
require "zlib"
require "stringio"
input = File.read "/dev/urandom", 200
corrupted and only 20 bytes long:
out...
bugmenot123 (DoNot BugMe)

Also available in: Atom