summaryrefslogtreecommitdiff
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
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
-rw-r--r--ChangeLog5
-rw-r--r--ext/socket/lib/socket.rb2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 4d3f332..716d763 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Jul 16 19:02:28 2009 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * ext/socket/lib/socket.rb (Socket.tcp_server_sockets_port0): servers
+ is nil if an error occurs before setting it.
+
Thu Jul 16 18:42:56 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* random.c (fill_random_seed): suppress a warning.
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