From: merch-redmine@... Date: 2019-10-31T16:23:58+00:00 Subject: [ruby-core:95610] [Ruby master Feature#10911] IPAddr.new should ignore zone identifiers Issue #10911 has been updated by jeremyevans0 (Jeremy Evans). Backport deleted (2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN) ruby -v deleted (ruby 2.1.5p273 (2014-11-13 revision 48405) [x86_64-linux]) Tracker changed from Bug to Feature File ipaddr-ipv6-zone-id-10911.patch added 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: ```ruby 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. ---------------------------------------- Feature #10911: IPAddr.new should ignore zone identifiers https://bugs.ruby-lang.org/issues/10911#change-82399 * Author: postmodern (Hal Brodigan) * Status: Assigned * Priority: Normal * Assignee: knu (Akinori MUSHA) * Target version: ---------------------------------------- Link local IPv6 addresses may have a zone identifier suffix: fe80::1%lo0 IPAddr.new currently does not ignore the zone identifier and raises IPAddr::InvalidAddressError. ---Files-------------------------------- ipaddr-ipv6-zone-id-10911.patch (5.17 KB) -- https://bugs.ruby-lang.org/ Unsubscribe: