зеркало из https://github.com/github/ruby.git
`fe80` should be case insensitive too
This commit is contained in:
Родитель
ba1472f43a
Коммит
d14397bcc4
|
@ -2462,7 +2462,7 @@ class Resolv
|
||||||
##
|
##
|
||||||
# IPv6 link local address format fe80:b:c:d:e:f:g:h%em1
|
# IPv6 link local address format fe80:b:c:d:e:f:g:h%em1
|
||||||
Regex_8HexLinkLocal = /\A
|
Regex_8HexLinkLocal = /\A
|
||||||
fe80
|
[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
|
||||||
|
@ -2471,7 +2471,7 @@ class Resolv
|
||||||
# Compressed IPv6 link local address format fe80::b%em1
|
# Compressed IPv6 link local address format fe80::b%em1
|
||||||
|
|
||||||
Regex_CompressedHexLinkLocal = /\A
|
Regex_CompressedHexLinkLocal = /\A
|
||||||
fe80:
|
[Ff][Ee]80:
|
||||||
(?:
|
(?:
|
||||||
((?:[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-Fa-f]{1,4})*)?)
|
((?:[0-9A-Fa-f]{1,4}(?::[0-9A-Fa-f]{1,4})*)?)
|
||||||
|
|
|
@ -25,6 +25,9 @@ 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)
|
||||||
|
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::1%EM1", bug17112)
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_valid_socket_ip_address_list
|
def test_valid_socket_ip_address_list
|
||||||
|
|
Загрузка…
Ссылка в новой задаче