mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
test_zlib(test_path_tmpfile): fix Zlib instance leak
follow-up: commit cf831f4918
This commit is contained in:
parent
cf831f4918
commit
756e8a2cf3
1 changed files with 6 additions and 4 deletions
|
@ -735,11 +735,13 @@ if defined? Zlib
|
||||||
io.write sio.string
|
io.write sio.string
|
||||||
io.rewind
|
io.rewind
|
||||||
|
|
||||||
gz = Zlib::GzipWriter.new(io)
|
gz0 = Zlib::GzipWriter.new(io)
|
||||||
assert_raise(NoMethodError) { gz.path }
|
assert_raise(NoMethodError) { gz0.path }
|
||||||
|
|
||||||
gz = Zlib::GzipReader.new(io)
|
gz1 = Zlib::GzipReader.new(io)
|
||||||
assert_raise(NoMethodError) { gz.path }
|
assert_raise(NoMethodError) { gz1.path }
|
||||||
|
gz0.close
|
||||||
|
gz1.close
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue