aboutsummaryrefslogtreecommitdiffstats
path: root/test/resolv
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-05-25 14:00:16 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-05-25 14:00:16 +0000
commit198964ea2f65c9f5b2e9afe8f5a7c27a03d7671e (patch)
tree5d23431820ffb56e2bf2b57765c231bb43ca1496 /test/resolv
parent62fc67b27bb04b917b1b558338e4aac9d78531e0 (diff)
downloadruby-198964ea2f65c9f5b2e9afe8f5a7c27a03d7671e.tar.gz
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
Diffstat (limited to 'test/resolv')
-rw-r--r--test/resolv/test_addr.rb2
-rw-r--r--test/resolv/test_dns.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/test/resolv/test_addr.rb b/test/resolv/test_addr.rb
index b4718430cc..e06c3c2a4c 100644
--- a/test/resolv/test_addr.rb
+++ b/test/resolv/test_addr.rb
@@ -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)
diff --git a/test/resolv/test_dns.rb b/test/resolv/test_dns.rb
index 82f37f9e6a..94a248e5fe 100644
--- a/test/resolv/test_dns.rb
+++ b/test/resolv/test_dns.rb
@@ -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