1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

resolv.rb: workaround for recent Rubygems

* lib/resolv.rb (Resolv::Hosts): get rid of load error in require
  which causes recent Rubygems to build all extension libraries.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2013-10-18 08:03:32 +00:00
parent ffcf1df1b5
commit 0712483fdd

View file

@ -166,6 +166,7 @@ class Resolv
class Hosts class Hosts
begin begin
raise LoadError unless /mswin|mingw|cygwin/ =~ RUBY_PLATFORM
require 'win32/resolv' require 'win32/resolv'
DefaultFileName = Win32::Resolv.get_hosts_path DefaultFileName = Win32::Resolv.get_hosts_path
rescue LoadError rescue LoadError