Project

General

Profile

Bug #12071 » cygwin.patch

Fix issue with w32/resolv on cygwin - Panyamin (Benjamin Gueroult), 02/14/2016 01:29 PM

View differences:

lib/resolv.rb 2015-11-10 12:48:14.000000000 +0100 → lib/resolv.rb 2016-01-24 23:46:29.250928900 +0100
168 168

  
169 169
  class Hosts
170 170
    begin
171
      raise LoadError unless /mswin|mingw|cygwin/ =~ RUBY_PLATFORM
171
      raise LoadError unless /mswin|mingw/ =~ RUBY_PLATFORM
172 172
      require 'win32/resolv'
173 173
      DefaultFileName = Win32::Resolv.get_hosts_path
174 174
    rescue LoadError
......
967 967
        if File.exist? filename
968 968
          config_hash = Config.parse_resolv_conf(filename)
969 969
        else
970
          if /mswin|cygwin|mingw|bccwin/ =~ RUBY_PLATFORM
970
          if /mswin|mingw|bccwin/ =~ RUBY_PLATFORM
971 971
            require 'win32/resolv'
972 972
            search, nameserver = Win32::Resolv.get_resolv_info
973 973
            config_hash = {}