зеркало из https://github.com/github/ruby.git
Avoid tempfile leaks using Tempfile.create instead of Tempfile.open.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46117 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
62fc67b27b
Коммит
198964ea2f
|
@ -17,7 +17,7 @@ class TestResolvAddr < Test::Unit::TestCase
|
|||
|
||||
def test_invalid_byte_comment
|
||||
bug9273 = '[ruby-core:59239] [Bug #9273]'
|
||||
Tempfile.open('resolv_test_addr_') do |tmpfile|
|
||||
Tempfile.create('resolv_test_addr_') do |tmpfile|
|
||||
tmpfile.print("\xff\x00\x40")
|
||||
tmpfile.close
|
||||
hosts = Resolv::Hosts.new(tmpfile.path)
|
||||
|
|
|
@ -153,7 +153,7 @@ class TestResolvDNS < Test::Unit::TestCase
|
|||
|
||||
def test_invalid_byte_comment
|
||||
bug9273 = '[ruby-core:59239] [Bug #9273]'
|
||||
Tempfile.open('resolv_test_dns_') do |tmpfile|
|
||||
Tempfile.create('resolv_test_dns_') do |tmpfile|
|
||||
tmpfile.print("\xff\x00\x40")
|
||||
tmpfile.close
|
||||
assert_nothing_raised(ArgumentError, bug9273) do
|
||||
|
|
Загрузка…
Ссылка в новой задаче