summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-11 07:54:52 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-11 07:54:52 +0000
commit3f0d724dc36df47e4b262f5c37f6690c2832277e (patch)
tree2f4f511766b585ef00951051bebcedc5c94d2164 /ext
parent0a954e9117168f0221b7cfd833b1e2ea6243ba16 (diff)
* ext/socket/lib/socket.rb (Socket.unix_server_socket): close the
socket when the block exits. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/socket/lib/socket.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/socket/lib/socket.rb b/ext/socket/lib/socket.rb
index 1099b7f..adc2814 100644
--- a/ext/socket/lib/socket.rb
+++ b/ext/socket/lib/socket.rb
@@ -612,6 +612,7 @@ class Socket
begin
yield s
ensure
+ s.close if !s.closed?
File.unlink path
end
else