mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
[rubygems/rubygems] Fix leaked tempfiles
Fix up https://github.com/rubygems/rubygems/pull/6882
525b94a89f
This commit is contained in:
parent
795587386c
commit
70ce3c8947
1 changed files with 4 additions and 0 deletions
|
@ -216,6 +216,8 @@ class TestGemPackageTarReaderEntry < Gem::Package::TarTestCase
|
|||
corrupt_entry.rewind
|
||||
|
||||
assert_nil corrupt_entry.read(100), "IO.read with len should return nil as per IO.read docs"
|
||||
ensure
|
||||
close_util_entry(corrupt_entry) if corrupt_entry
|
||||
end
|
||||
|
||||
def test_readpartial_corrupted_tar
|
||||
|
@ -228,6 +230,8 @@ class TestGemPackageTarReaderEntry < Gem::Package::TarTestCase
|
|||
assert_raise EOFError do
|
||||
corrupt_entry.readpartial(100)
|
||||
end
|
||||
ensure
|
||||
close_util_entry(corrupt_entry) if corrupt_entry
|
||||
end
|
||||
|
||||
def test_rewind
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue