From 7727b22eb1dd2aab3127a0b4fdb6ee52aedf358e Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 30 Apr 2018 02:17:03 +0000 Subject: io.c: workaround for EPROTOTYPE * io.c (internal_write_func, internal_writev_func): retry at unexpected EPROTOTYPE on macOS, to get rid of a kernel bug. [ruby-core:86690] [Bug #14713] * ext/socket/init.c (rsock_{sendto,send,write}_blocking): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/net/ftp/test_ftp.rb | 2 +- test/webrick/test_httpserver.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/net/ftp/test_ftp.rb b/test/net/ftp/test_ftp.rb index f1c13c287f..36292f181a 100644 --- a/test/net/ftp/test_ftp.rb +++ b/test/net/ftp/test_ftp.rb @@ -425,7 +425,7 @@ class FTPTest < Test::Unit::TestCase end conn.print(l, "\r\n") end - rescue Errno::EPIPE, Errno::EPROTOTYPE + rescue Errno::EPIPE ensure assert_nil($!) conn.close diff --git a/test/webrick/test_httpserver.rb b/test/webrick/test_httpserver.rb index 3f888110be..77da797282 100644 --- a/test/webrick/test_httpserver.rb +++ b/test/webrick/test_httpserver.rb @@ -452,7 +452,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, Errno::EPROTOTYPE) do + assert_raise(Errno::ECONNRESET, Errno::EPIPE) do loop { c.write(junk) } end end -- cgit v1.2.3