ruby-changes:63067
From: Jeremy <ko1@a...>
Date: Thu, 24 Sep 2020 21:42:22 +0900 (JST)
Subject: [ruby-changes:63067] 0fe6461148 (master): [ruby/webrick] Allow EPROTOTYPE error when writing junk to a socket
https://git.ruby-lang.org/ruby.git/commit/?id=0fe6461148 From 0fe6461148af5f27c2a89a6bb25b6709b9eaca49 Mon Sep 17 00:00:00 2001 From: Jeremy Evans <code@j...> Date: Sun, 26 Jul 2020 07:46:13 -0700 Subject: [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 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 @@ class TestWEBrickHTTPServer < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/webrick/test_httpserver.rb#L484 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 -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/