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
This commit is contained in:
usa 2015-01-14 06:55:00 +00:00
parent dd7f1cdfbd
commit e6a5f817d6
5 changed files with 32 additions and 5 deletions

View file

@ -1,3 +1,10 @@
Wed Jan 14 15:54:18 2015 Aaron Patterson <aaron@tenderlovemaking.com>
* 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
Fri Nov 28 16:43:20 2014 Eric Hodel <drbrain@segment7.net>
* lib/net/http.rb: Do not attempt SSL session resumption when the

View file

@ -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

View file

@ -23,6 +23,20 @@ class TestResolvDNS < Test::Unit::TestCase
end
end
# [ruby-core:65836]
def test_resolve_with_2_ndots
conf = Resolv::DNS::Config.new :nameserver => ['127.0.0.1'], :ndots => 2
assert conf.single?
candidates = []
conf.resolv('example.com') { |candidate, *args|
candidates << candidate
raise Resolv::DNS::Config::NXDomain
}
n = Resolv::DNS::Name.create 'example.com.'
assert_equal n, candidates.last
end
def test_query_ipv4_address
begin
OpenSSL

View file

@ -1,10 +1,10 @@
#define RUBY_VERSION "2.0.0"
#define RUBY_RELEASE_DATE "2014-11-28"
#define RUBY_PATCHLEVEL 606
#define RUBY_RELEASE_DATE "2015-01-14"
#define RUBY_PATCHLEVEL 607
#define RUBY_RELEASE_YEAR 2014
#define RUBY_RELEASE_MONTH 11
#define RUBY_RELEASE_DAY 28
#define RUBY_RELEASE_YEAR 2015
#define RUBY_RELEASE_MONTH 1
#define RUBY_RELEASE_DAY 14
#include "ruby/version.h"

View file

@ -1399,6 +1399,8 @@ insert(const char *path, VALUE vinfo, void *enc)
return 0;
}
/* License: RubArtistic or GPL */
/* License: Artistic or GPL */
static NtCmdLineElement **
cmdglob(NtCmdLineElement *patt, NtCmdLineElement **tail)