1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
normal 2017-04-11 14:56:17 +00:00
parent e042dd0ee1
commit abc5e8966c

View file

@ -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)