summaryrefslogtreecommitdiff
path: root/ext/socket
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-16 10:04:17 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-16 10:04:17 +0000
commit1c75d58165fef446d507ce6f05e50eeaa66772f7 (patch)
tree948e6e529c695c79260032749b55401e3dfcf24f /ext/socket
parent3622071601cd1d325a0155cd8c37df2692374722 (diff)
* ext/socket/lib/socket.rb (Socket.tcp_server_sockets_port0): servers
is nil if an error occurs before setting it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24152 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket')
-rw-r--r--ext/socket/lib/socket.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/socket/lib/socket.rb b/ext/socket/lib/socket.rb
index b12fc4a..8d41748 100644
--- a/ext/socket/lib/socket.rb
+++ b/ext/socket/lib/socket.rb
@@ -312,7 +312,7 @@ class Socket
}
sockets
ensure
- sockets.each {|s| s.close if !s.closed? } if $!
+ sockets.each {|s| s.close if !s.closed? } if $! && sockets
end
class << self
private :tcp_server_sockets_port0