Skip to content

Commit 06f1a6e

Browse files
authored
Merge pull request #2981 from nobu/open-in-binmode
Compressed files must be opened in binary mode
2 parents 92fe9eb + 1582ce7 commit 06f1a6e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

test/stdlib/zlib/GzipReader_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def test_wrap
2929
path = File.join(tmpdir, "test.gz")
3030
Zlib::GzipWriter.open(path) { _1.puts "hello" }
3131

32-
File.open(path) do |io|
32+
File.open(path, "rb") do |io|
3333
assert_send_type "(IO io) -> Zlib::GzipReader",
3434
Zlib::GzipReader, :wrap, io
3535

0 commit comments

Comments
 (0)