Actions
Bug #13593
closedAddrinfo#== behaves oddly
Bug #13593:
Addrinfo#== behaves oddly
Description
It appears as if Addrinfo is using object identity. Addrinfo#== doesn't appear to work as one might expect, given the same instantiation:
> irb
2.4.0 :001 > require 'socket'
=> true
2.4.0 :002 > Addrinfo.tcp('0.0.0.0', 1234) == Addrinfo.tcp('0.0.0.0', 1234)
=> false
2.4.0 :003 > a = Addrinfo.tcp('0.0.0.0', 1234)
=> #<Addrinfo: 0.0.0.0:1234 TCP>
2.4.0 :004 > a == a
=> true
2.4.0 :005 >
Files
Actions