From abc5e8966ce348fcb96832d8d28416bac4eb151b Mon Sep 17 00:00:00 2001 From: normal Date: Tue, 11 Apr 2017 14:56:17 +0000 Subject: 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 --- ext/socket/lib/socket.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/socket') diff --git a/ext/socket/lib/socket.rb b/ext/socket/lib/socket.rb index d079ec508e..de5eda3991 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) -- cgit v1.2.3