ruby-changes:65127
From: Nobuyoshi <ko1@a...>
Date: Wed, 3 Feb 2021 17:33:19 +0900 (JST)
Subject: [ruby-changes:65127] d05a268adc (master): Open gzip file in binary mode
https://git.ruby-lang.org/ruby.git/commit/?id=d05a268adc From d05a268adc402e0a9a5eac0ce291cfd34e68f29a Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> 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(-) 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 https://github.com/ruby/ruby/blob/trunk/test/zlib/test_zlib.rb#L516 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.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/