From 6b11ee7288c83c3cd06273a156993369ebdb3f51 Mon Sep 17 00:00:00 2001 From: akr Date: Tue, 23 Feb 2010 11:41:44 +0000 Subject: [PATCH] call unix_server.close only if unix_server is not nil. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26733 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/socket/test_socket.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/socket/test_socket.rb b/test/socket/test_socket.rb index ae29ae1ed5..a2c0baf1e4 100644 --- a/test/socket/test_socket.rb +++ b/test/socket/test_socket.rb @@ -191,7 +191,7 @@ class TestSocket < Test::Unit::TestCase assert_equal(clients.length, accepted.length) ensure tcp_servers.each {|s| s.close if !s.closed? } - unix_server.close if !unix_server.closed? + unix_server.close if unix_server && !unix_server.closed? clients.each {|s| s.close if !s.closed? } accepted.each {|s| s.close if !s.closed? } end