diff options
Diffstat (limited to 'test/resolv')
-rw-r--r-- | test/resolv/test_addr.rb | 2 | ||||
-rw-r--r-- | test/resolv/test_dns.rb | 2 |
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 |