From 2ee9353fba7be5443db2ccdc3541586932ccf1f1 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 8 Dec 2018 17:33:51 +0000 Subject: remove IO#close_on_exec= calls Since we've required Ruby 2.0+ for a while, we can assume descriptors are created with IO#close_on_exec=true and avoid bloating our code with calls to it. --- test/test_server.rb | 3 --- 1 file changed, 3 deletions(-) (limited to 'test/test_server.rb') diff --git a/test/test_server.rb b/test/test_server.rb index a113b43..75e1857 100644 --- a/test/test_server.rb +++ b/test/test_server.rb @@ -182,7 +182,6 @@ class TestServer < Testcase tmpdir = yahns_mktmpdir sock = "#{tmpdir}/sock" unix_srv = UNIXServer.new(sock) - unix_srv.close_on_exec = true msgs = %w(ZZ zz) err = @err cfg = Yahns::Config.new @@ -234,7 +233,6 @@ class TestServer < Testcase bpipe[0].close a = UNIXSocket.new(sock) b = UNIXSocket.new(sock) - b.close_on_exec = a.close_on_exec = true a.write("GET /sleep HTTP/1.0\r\n\r\n") r = IO.select([a], nil, nil, 4) assert r, "nothing ready" @@ -681,7 +679,6 @@ class TestServer < Testcase assert_equal "INFO HIHI\n", re.read c = UNIXSocket.new(sock) - c.close_on_exec = true c.write "GET /\r\n\r\n" assert_equal c, c.wait(30) assert_equal "OK", c.read -- cgit v1.2.3-24-ge0c7