about summary refs log tree commit homepage
diff options
context:
space:
mode:
-rw-r--r--test/test_helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/test_helper.rb b/test/test_helper.rb
index c87cc1a..d9ff90c 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -110,7 +110,7 @@ def unused_port(addr = '127.0.0.1')
     # when running tests in parallel with gmake.  Create a lock file while
     # we have the port here to ensure that does not happen .
     lock_path = "#{Dir::tmpdir}/unicorn_test.#{addr}:#{port}.lock"
-    File.open(lock_path, File::WRONLY|File::CREAT|File::EXCL, 0600)
+    File.open(lock_path, File::WRONLY|File::CREAT|File::EXCL, 0600).close
     at_exit { File.unlink(lock_path) rescue nil }
   rescue Errno::EEXIST
     sock.close rescue nil