summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-14 06:55:00 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-14 06:55:00 +0000
commite6a5f817d613dbd40cf2d19cd0705a1b4c377538 (patch)
tree0e38c2d393104777c836c80036c0e9945098fb09 /lib
parentdd7f1cdfbd8215ee46c11175bfd2f4fd3569f34a (diff)
merge revision(s) 48534: [Backport #10412]
* 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/branches/ruby_2_0_0@49245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/resolv.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/resolv.rb b/lib/resolv.rb
index 53bfd54a11..a302d8a6af 100644
--- a/lib/resolv.rb
+++ b/lib/resolv.rb
@@ -1039,6 +1039,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