From 7c467109dd6cb3453fa6c2370374ee3b469da373 Mon Sep 17 00:00:00 2001 From: naruse Date: Fri, 5 Jul 2013 18:38:17 +0000 Subject: [PATCH] Use server_port for Windows fix r41686 [Bug #8574] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41802 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/socket/test_tcp.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/socket/test_tcp.rb b/test/socket/test_tcp.rb index b594682904..aeceef6315 100644 --- a/test/socket/test_tcp.rb +++ b/test/socket/test_tcp.rb @@ -21,7 +21,11 @@ class TestSocket_TCPSocket < Test::Unit::TestCase TCPSocket.new(addr, server_port, addr, client_port) flunk "expected SystemCallError" rescue SystemCallError => e - assert_match "for \"#{addr}\" port #{client_port}", e.message + if /mswin|mingw/ =~ RUBY_PLATFORM + assert_match "for \"#{addr}\" port #{server_port}", e.message + else + assert_match "for \"#{addr}\" port #{client_port}", e.message + end end end