summaryrefslogtreecommitdiff
path: root/ext/socket/lib
diff options
context:
space:
mode:
Diffstat (limited to 'ext/socket/lib')
-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 31dc596d3e..5c3ed400f4 100644
--- a/ext/socket/lib/socket.rb
+++ b/ext/socket/lib/socket.rb
@@ -1102,7 +1102,7 @@ class Socket < BasicSocket
st = File.lstat(path)
rescue Errno::ENOENT
end
- if st && st.socket? && st.owned?
+ if st&.socket? && st.owned?
File.unlink path
end
end