summaryrefslogtreecommitdiff
path: root/ext/socket
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-04-11 14:56:17 (GMT)
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-04-11 14:56:17 (GMT)
commitabc5e8966ce348fcb96832d8d28416bac4eb151b (patch)
tree79c16e525cba960df839d195b4510210d1c616fe /ext/socket
parente042dd0ee19f4e459a1bd2ae4b2291f4e9cd8981 (diff)
Socket.udp_server_sockets: use symbol proc
Symbol proc is shorter human and machine code; and also avoids needing to name variables. * ext/socket/lib/socket.rb (Socket.udp_server_sockets): use symbol proc git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58320 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 d079ec5..de5eda3 100644
--- a/ext/socket/lib/socket.rb
+++ b/ext/socket/lib/socket.rb
@@ -897,7 +897,7 @@ class Socket < BasicSocket
ip_list << ai
end
}
- ip_list.uniq!{|e| e.to_sockaddr}
+ ip_list.uniq!(&:to_sockaddr)
if port == 0
sockets = ip_sockets_port0(ip_list, false)