From: shyouhei@... Date: 2017-05-24T03:00:27+00:00 Subject: [ruby-core:81365] [Ruby trunk Bug#13593] Addrinfo#== behaves oddly Issue #13593 has been updated by shyouhei (Shyouhei Urabe). Accurate observation. It does not define equality so falls back to Object's definition, which compares identity. I guess this is not by design; just no one had seriously needed yet. ---------------------------------------- Bug #13593: Addrinfo#== behaves oddly https://bugs.ruby-lang.org/issues/13593#change-65060 * Author: ioquatix (Samuel Williams) * Status: Open * Priority: Normal * Assignee: * Target version: * ruby -v: * Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN ---------------------------------------- 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) => # 2.4.0 :004 > a == a => true 2.4.0 :005 > ~~~ -- https://bugs.ruby-lang.org/ Unsubscribe: