I'm referring to this code, which is already rescuing Errno::ENETUNREACH. I ran into this today, because (for whatever reason) my home router was configured to block all IPv6 traffic, and apparently an IPv6 address was yielded before its IPv4 counterpart by Addrinfo.foreach.