I don't think this is a bug. The decision to not support zone identifiers seems deliberate as there are tests that using a zone identifier raises an exception:

assert_raise(IPAddr::InvalidAddressError){IPAddr.new("fe80::1%fxp0")}

Still, I think this would be a useful feature to add. We should not ignore the zone identifier, as it a property of the address. Attached is a patch that implements support for it, so that to_s and inspect will show the zone identifier. It doesn't consider the zone identifier when determining equality, just as the mask_addr is not currently considered for that. That may be a bug (#11531), but at least it is consistent.

Good point. We would probably want to fix socket to support this before adding support to ipaddr. I think it is reasonable for socket to support it, as tools dealing with IPv6 should handle zone identifiers. I tried ping6 and traceroute6:

Good point. We would probably want to fix socket to support this before adding support to ipaddr.

It turns out that the socket library already supports this, at least on my operating system (and I would guess other operating systems supporting IPv6 zone identifiers). If I get the IPv6 loopback address with the zone identifier, and use nc to create a listening socket: