From d05a268adc402e0a9a5eac0ce291cfd34e68f29a Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Wed, 3 Feb 2021 17:32:41 +0900 Subject: Open gzip file in binary mode --- test/zlib/test_zlib.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/zlib') diff --git a/test/zlib/test_zlib.rb b/test/zlib/test_zlib.rb index addd4270e1..42ee5c6638 100644 --- a/test/zlib/test_zlib.rb +++ b/test/zlib/test_zlib.rb @@ -516,14 +516,14 @@ if defined? Zlib gz.close results = [] - t = File.open(t.path) + t = File.open(t.path, 'rb') Zlib::GzipReader.zcat(t) do |str| results << str end assert_equal(["foo", "bar"], results) t.close - t = File.open(t.path) + t = File.open(t.path, 'rb') assert_equal("foobar", Zlib::GzipReader.zcat(t)) t.close } -- cgit v1.2.1