diff options
author | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-11-21 20:04:27 +0000 |
---|---|---|
committer | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-11-21 20:04:27 +0000 |
commit | 570c028c7ebb18c6d276e5fac3a1b20f76f28db7 (patch) | |
tree | 632b274229b0854d82e1b655fe34cd5cff26f53d /lib/resolv.rb | |
parent | 8eb0c810b228df1f8352c005a7ae882ad4179b4b (diff) |
* lib/resolv.rb: fall back if canonicalization fails.
Thanks Vit Ondruch for the patch! [ruby-core:65836]
* test/resolv/test_dns.rb: test for patch
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/resolv.rb')
-rw-r--r-- | lib/resolv.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/resolv.rb b/lib/resolv.rb index 293e559acf..c19aeacd05 100644 --- a/lib/resolv.rb +++ b/lib/resolv.rb @@ -1066,6 +1066,10 @@ class Resolv candidates = [] end candidates.concat(@search.map {|domain| Name.new(name.to_a + domain)}) + fname = Name.create("#{name}.") + if !candidates.include?(fname) + candidates << fname + end end return candidates end |