summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJeremy Evans <code@jeremyevans.net>2020-07-26 07:46:13 -0700
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2020-09-24 21:33:16 +0900
commit0fe6461148af5f27c2a89a6bb25b6709b9eaca49 (patch)
tree73a24513520c12c8bf52caad18364f20b8ed187a /test
parentb8fdd38b2e01abcfd4cc8d007a3b3afb285f5ddb (diff)
[ruby/webrick] Allow EPROTOTYPE error when writing junk to a socket
MacOS seems to raise this error in some cases. https://github.com/ruby/webrick/commit/0f0c9f1e61
Diffstat (limited to 'test')
-rw-r--r--test/webrick/test_httpserver.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/webrick/test_httpserver.rb b/test/webrick/test_httpserver.rb
index 2e5d44940c..4133be85ad 100644
--- a/test/webrick/test_httpserver.rb
+++ b/test/webrick/test_httpserver.rb
@@ -484,7 +484,7 @@ class TestWEBrickHTTPServer < Test::Unit::TestCase
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