test/test_unix_server.rb in kgio-2.8.0.2.g30c1 vs test/test_unix_server.rb in kgio-2.8.1

- old
+ new

@@ -1,14 +1,15 @@ require 'tempfile' +require 'tmpdir' require './test/lib_server_accept' class TestKgioUNIXServer < Test::Unit::TestCase def setup - tmp = Tempfile.new('kgio_unix') + @tmpdir = Dir.mktmpdir('kgio_unix_2') + tmp = Tempfile.new('kgio_unix_2', @tmpdir) @path = tmp.path - File.unlink(@path) - tmp.close rescue nil + tmp.close! @srv = Kgio::UNIXServer.new(@path) @host = '127.0.0.1' end def client_connect