From 29bc0766942a92549774d0439d1a6362c53bc26c Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 3 Sep 2014 07:10:04 +0000 Subject: test/http: plug race condition in FIFO test This is noticeable in the trunk version of ruby since r47288 ("io.c: do not swallow exceptions at end of block"). --- test/http.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/http.rb b/test/http.rb index c847046..e23bddf 100644 --- a/test/http.rb +++ b/test/http.rb @@ -271,7 +271,7 @@ class TestHTTP < Test::Unit::TestCase # wake up the blocked threads writer = Thread.new do nr.times do |i| - File.open(fifo % i, "w") { |fp| fp.write(i.to_s) } + File.open(fifo % i, "w").close end end -- cgit v1.2.3-24-ge0c7