From: merch-redmine@... Date: 2019-06-20T18:00:20+00:00 Subject: [ruby-core:93282] [Ruby trunk Bug#14612] IPv6 address inconsistency (downcase vs. upcase) Issue #14612 has been updated by jeremyevans0 (Jeremy Evans). Assignee set to akr (Akira Tanaka) Status changed from Open to Assigned File resolv-ipv6-lowercase.patch added I agree that Ruby should consistently use lowercase for IPv6 addresses. However, I don't think we should introduce a dependency on `ipaddr` to `resolv`. For one, it changes how the IPv6 addresses with noncontiguous 0 components are displayed. Attached a simpler patch that just uses `%x` instead of `%X` in sprintf. ---------------------------------------- Bug #14612: IPv6 address inconsistency (downcase vs. upcase) https://bugs.ruby-lang.org/issues/14612#change-78748 * Author: chucke (Tiago Cardoso) * Status: Assigned * Priority: Normal * Assignee: akr (Akira Tanaka) * Target version: * ruby -v: 2.5.0 * Backport: 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN ---------------------------------------- I've noticed that sometimes ip addresses re shown using a-f characters in downcase, other times upcase. Here is a small script to show results: ```ruby require "resolv" require "socket" puts TCPSocket.getaddress("nghttp2.org") #=> "2400:8902::f03c:91ff:fe69:a454" puts Resolv.getaddresses("nghttp2.org") #=> ["139.162.123.134", "2400:8902::F03C:91FF:FE69:A454"] ``` Results might be system-dependent (I'm using Mac OS High Sierra). This makes compare operations a bit harder. ---Files-------------------------------- resolv-ipv6-to_s.patch (1.48 KB) resolv-ipv6-lowercase.patch (1.82 KB) -- https://bugs.ruby-lang.org/ Unsubscribe: