summaryrefslogtreecommitdiff
path: root/test/zlib
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-02-03 17:32:41 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-02-03 17:32:41 +0900
commitd05a268adc402e0a9a5eac0ce291cfd34e68f29a (patch)
tree210ac5f31ba593c29837a3b75d1e90e451f63cff /test/zlib
parent583f364f7187337b284061b78a47b29875398e33 (diff)
Open gzip file in binary mode
Diffstat (limited to 'test/zlib')
-rw-r--r--test/zlib/test_zlib.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/zlib/test_zlib.rb b/test/zlib/test_zlib.rb
index addd427..42ee5c6 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
}