@leozwa 那样不可以,如果返回的是个数组,那 readable 变量就会变成数组变量
This method will generate warnings that the family, port, and host variables are unused.
def get_ip(sock)
family, port, host, address = sock.peeraddr
address
end
Using underscores will stop the warnings, but lose the self-documenting nature of the code
def get_ip(sock)
_, _, _, address = sock.peeraddr
address
end
As of Ruby 2.0.0 we can get the best of both worlds by starting the variables with an _
def get_ip(sock)
_family, _port, _host, address = sock.peeraddr
address
end
@betterthornbird 你那边的老板不认识,估计难
@betterthornbird 能内部 transfer 吗?
:plus+1:
:plus1:
@gene_wu 我要去旁听
#23 楼 @kevinclcn kevinclcn at gmail.com
来晚啦?
@gene_wu 过去旁听可以吗?
@gene_wu 参加需要什么条件吗?