summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2025-09-02 10:38:36 -0700
committerTakashi Kokubun <takashikkbn@gmail.com>2025-09-02 10:38:37 -0700
commit8e1b5cba70b66a6e54f2189eb4321919b7ab776a (patch)
tree0e0e17adae49775a37c2dfd241b3bc5762f9f5c2
parentb1b4984fb94fc3d3c17237f8a6a3f8fe90996846 (diff)
test_socket.rb: Permit ProxyError for Windows
https://github.com/ruby/ruby/actions/runs/17410747983/job/49427074277
-rw-r--r--test/socket/test_socket.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/socket/test_socket.rb b/test/socket/test_socket.rb
index 4b85d43291..e746aca101 100644
--- a/test/socket/test_socket.rb
+++ b/test/socket/test_socket.rb
@@ -173,8 +173,11 @@ class TestSocket < Test::Unit::TestCase
def errors_addrinuse
errs = [Errno::EADDRINUSE]
- # MinGW fails with "Errno::EACCES: Permission denied - bind(2) for 0.0.0.0:49721"
- errs << Errno::EACCES if /mingw/ =~ RUBY_PLATFORM
+ # Windows can fail with "Errno::EACCES: Permission denied - bind(2) for 0.0.0.0:49721"
+ # or "Test::Unit::ProxyError: Permission denied - bind(2) for 0.0.0.0:55333"
+ if /mswin|mingw/ =~ RUBY_PLATFORM
+ errs += [Errno::EACCES, Test::Unit::ProxyError]
+ end
errs
end