Issue #14612 has been updated by shevegen (Robert A. Heiler).


Is there a standard that mandates or prefers either variant?

If not then perhaps ruby should decide on which variant to
prefer.

----------------------------------------
Bug #14612: IPv6 address inconsistency (downcase vs. upcase)
https://bugs.ruby-lang.org/issues/14612#change-71055

* Author: chucke (Tiago Cardoso)
* Status: Open
* Priority: Normal
* Assignee: 
* 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. 



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>