ruby-changes:65530
From: Sorah <ko1@a...>
Date: Wed, 17 Mar 2021 02:43:03 +0900 (JST)
Subject: [ruby-changes:65530] 756e8a2cf3 (master): test_zlib(test_path_tmpfile): fix Zlib instance leak
https://git.ruby-lang.org/ruby.git/commit/?id=756e8a2cf3 From 756e8a2cf3424b9a3eb9dde4a01325cba21a7e81 Mon Sep 17 00:00:00 2001 From: Sorah Fukumori <sorah@c...> Date: Wed, 17 Mar 2021 02:40:43 +0900 Subject: test_zlib(test_path_tmpfile): fix Zlib instance leak follow-up: commit cf831f49189c4a890da6845e39199a5dfaf4fb48 --- test/zlib/test_zlib.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/test/zlib/test_zlib.rb b/test/zlib/test_zlib.rb index 4da3bb4..83ce375 100644 --- a/test/zlib/test_zlib.rb +++ b/test/zlib/test_zlib.rb @@ -735,11 +735,13 @@ if defined? Zlib https://github.com/ruby/ruby/blob/trunk/test/zlib/test_zlib.rb#L735 io.write sio.string io.rewind - gz = Zlib::GzipWriter.new(io) - assert_raise(NoMethodError) { gz.path } + gz0 = Zlib::GzipWriter.new(io) + assert_raise(NoMethodError) { gz0.path } - gz = Zlib::GzipReader.new(io) - assert_raise(NoMethodError) { gz.path } + gz1 = Zlib::GzipReader.new(io) + assert_raise(NoMethodError) { gz1.path } + gz0.close + gz1.close end end end -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/