mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[ruby/resolv] Support more characters in link local addresses
Implements [Feature #17524] https://github.com/ruby/resolv/commit/993a1a374f
This commit is contained in:
parent
421bb589be
commit
d494a16ac5
2 changed files with 6 additions and 2 deletions
|
@ -2464,7 +2464,7 @@ class Resolv
|
||||||
Regex_8HexLinkLocal = /\A
|
Regex_8HexLinkLocal = /\A
|
||||||
[Ff][Ee]80
|
[Ff][Ee]80
|
||||||
(?::[0-9A-Fa-f]{1,4}){7}
|
(?::[0-9A-Fa-f]{1,4}){7}
|
||||||
%[0-9A-Za-z]+
|
%[-0-9A-Za-z._~]+
|
||||||
\z/x
|
\z/x
|
||||||
|
|
||||||
##
|
##
|
||||||
|
@ -2478,7 +2478,7 @@ class Resolv
|
||||||
|
|
|
|
||||||
:((?:[0-9A-Fa-f]{1,4}(?::[0-9A-Fa-f]{1,4})*)?)
|
:((?:[0-9A-Fa-f]{1,4}(?::[0-9A-Fa-f]{1,4})*)?)
|
||||||
)?
|
)?
|
||||||
:[0-9A-Fa-f]{1,4}%[0-9A-Za-z.]+
|
:[0-9A-Fa-f]{1,4}%[-0-9A-Za-z._~]+
|
||||||
\z/x
|
\z/x
|
||||||
|
|
||||||
##
|
##
|
||||||
|
|
|
@ -28,6 +28,10 @@ class TestResolvAddr < Test::Unit::TestCase
|
||||||
assert_match(Resolv::IPv6::Regex, "FE80:2:3:4:5:6:7:8%EM1", bug17112)
|
assert_match(Resolv::IPv6::Regex, "FE80:2:3:4:5:6:7:8%EM1", bug17112)
|
||||||
assert_match(Resolv::IPv6::Regex, "FE80::20D:3AFF:FE7D:9760%ETH0", bug17112)
|
assert_match(Resolv::IPv6::Regex, "FE80::20D:3AFF:FE7D:9760%ETH0", bug17112)
|
||||||
assert_match(Resolv::IPv6::Regex, "FE80::1%EM1", bug17112)
|
assert_match(Resolv::IPv6::Regex, "FE80::1%EM1", bug17112)
|
||||||
|
|
||||||
|
bug17524 = "[ruby-core:101992]"
|
||||||
|
assert_match(Resolv::IPv6::Regex, "FE80::20D:3AFF:FE7D:9760%ruby_3.0.0-1", bug17524)
|
||||||
|
assert_match(Resolv::IPv6::Regex, "fe80::1%ruby_3.0.0-1", bug17524)
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_valid_socket_ip_address_list
|
def test_valid_socket_ip_address_list
|
||||||
|
|
Loading…
Reference in a new issue