ruby-changes:45553
From: nagachika <ko1@a...>
Date: Tue, 14 Feb 2017 18:56:38 +0900 (JST)
Subject: [ruby-changes:45553] nagachika:r57626 (ruby_2_3): revert r57571. `merge revision(s) 55781, 55783: [Backport #12604]`
nagachika 2017-02-14 18:56:33 +0900 (Tue, 14 Feb 2017) New Revision: 57626 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=57626 Log: revert r57571. `merge revision(s) 55781,55783: [Backport #12604]` It breaked CI on vc12-x64 http://13.78.52.201/vc12-x64/ruby-2.3/log/20170207T182419Z.log.html.gz Removed directories: branches/ruby_2_3/ext/win32/resolv/ Modified directories: branches/ruby_2_3/ Modified files: branches/ruby_2_3/ChangeLog branches/ruby_2_3/ext/win32/lib/win32/resolv.rb branches/ruby_2_3/version.h Index: ruby_2_3/version.h =================================================================== --- ruby_2_3/version.h (revision 57625) +++ ruby_2_3/version.h (revision 57626) @@ -1,10 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_3/version.h#L1 #define RUBY_VERSION "2.3.3" -#define RUBY_RELEASE_DATE "2017-02-08" -#define RUBY_PATCHLEVEL 245 +#define RUBY_RELEASE_DATE "2017-02-14" +#define RUBY_PATCHLEVEL 246 #define RUBY_RELEASE_YEAR 2017 #define RUBY_RELEASE_MONTH 2 -#define RUBY_RELEASE_DAY 8 +#define RUBY_RELEASE_DAY 14 #include "ruby/version.h" Index: ruby_2_3/ChangeLog =================================================================== --- ruby_2_3/ChangeLog (revision 57625) +++ ruby_2_3/ChangeLog (revision 57626) @@ -1,9 +1,3 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_3/ChangeLog#L1 -Wed Feb 8 02:20:16 2017 Nobuyoshi Nakada <nobu@r...> - - * ext/win32/resolv/resolv.c (get_dns_server_list): [Win32] get DNS - servers only for connected network devices by GetNetworkParams - API. [Bug #12604] - Wed Feb 8 02:17:02 2017 Nobuyoshi Nakada <nobu@r...> * lib/forwardable.rb (Forwardable._delegator_method): extract Index: ruby_2_3/ext/win32/lib/win32/resolv.rb =================================================================== --- ruby_2_3/ext/win32/lib/win32/resolv.rb (revision 57625) +++ ruby_2_3/ext/win32/lib/win32/resolv.rb (revision 57626) @@ -33,12 +33,6 @@ module Win32 https://github.com/ruby/ruby/blob/trunk/ruby_2_3/ext/win32/lib/win32/resolv.rb#L33 end [ search, nameserver ] end -end - -begin - require 'win32/resolv.so' -rescue LoadError -end module Kernel32 extend Importer @@ -48,7 +42,6 @@ getv = Kernel32.extern "int GetVersionEx https://github.com/ruby/ruby/blob/trunk/ruby_2_3/ext/win32/lib/win32/resolv.rb#L42 info = [ 148, 0, 0, 0, 0 ].pack('V5') + "\0" * 128 getv.call(info) if info.unpack('V5')[4] == 2 # VER_PLATFORM_WIN32_NT -module Win32 #==================================================================== # Windows NT #==================================================================== @@ -65,7 +58,7 @@ module Win32 https://github.com/ruby/ruby/blob/trunk/ruby_2_3/ext/win32/lib/win32/resolv.rb#L58 def get_info search = nil - nameserver = get_dns_server_list + nameserver = [] Registry::HKEY_LOCAL_MACHINE.open(TCPIP_NT) do |reg| begin slist = reg.read_s('SearchList') @@ -92,15 +85,20 @@ module Win32 https://github.com/ruby/ruby/blob/trunk/ruby_2_3/ext/win32/lib/win32/resolv.rb#L85 reg.open('Interfaces') do |h| h.each_key do |iface,| h.open(iface) do |regif| - next unless ns = %w[NameServer DhcpNameServer].find do |key| - begin - ns = regif.read_s(key) - rescue Registry::Error - else - break ns.split(/[,\s]\s*/) unless ns.empty? + begin + [ 'NameServer', 'DhcpNameServer' ].each do |key| + begin + ns = regif.read_s(key) + rescue + else + unless ns.empty? + nameserver.concat(ns.split(/[,\s]\s*/)) + break + end + end end + rescue Registry::Error end - next if (nameserver & ns).empty? if add_search begin Property changes on: ruby_2_3 ___________________________________________________________________ Modified: svn:mergeinfo Reverse-merged /trunk:r55781,55783 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/