mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/resolv.rb (Resolv::DNS::Label::Str#==): Check class equality.
(Resolv::DNS::Name#initialize): Normalize labels as Resolv::DNS::Label::Str objects. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
31d24fae56
commit
ec7f1f5dc2
3 changed files with 22 additions and 1 deletions
|
@ -190,4 +190,11 @@ class TestResolvDNS < Test::Unit::TestCase
|
|||
upper = Resolv::DNS::Name.create("Ruby-Lang.org")
|
||||
assert_equal(lower, upper, bug10550)
|
||||
end
|
||||
|
||||
def test_ipv6_name
|
||||
addr = Resolv::IPv6.new("\0"*16)
|
||||
labels = addr.to_name.to_a
|
||||
expected = (['0'] * 32 + ['ip6', 'arpa']).map {|label| Resolv::DNS::Label::Str.new(label) }
|
||||
assert_equal(expected, labels)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue