From 0f0c9f1e61e5911ca3e0634a67095827c2454b93 Mon Sep 17 00:00:00 2001 From: Jeremy Evans Date: Sun, 26 Jul 2020 07:46:13 -0700 Subject: [PATCH] Allow EPROTOTYPE error when writing junk to a socket MacOS seems to raise this error in some cases. --- test/webrick/test_httpserver.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/webrick/test_httpserver.rb b/test/webrick/test_httpserver.rb index 2e5d449..4133be8 100644 --- a/test/webrick/test_httpserver.rb +++ b/test/webrick/test_httpserver.rb @@ -484,7 +484,7 @@ def test_gigantic_request_header TCPSocket.open(addr, port) do |c| c.write("GET / HTTP/1.0\r\n") junk = -"X-Junk: #{' ' * 1024}\r\n" - assert_raise(Errno::ECONNRESET, Errno::EPIPE) do + assert_raise(Errno::ECONNRESET, Errno::EPIPE, Errno::EPROTOTYPE) do loop { c.write(junk) } end end