summaryrefslogtreecommitdiff
path: root/ext/dl/win32/lib/win32/resolv.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/dl/win32/lib/win32/resolv.rb')
-rw-r--r--ext/dl/win32/lib/win32/resolv.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/dl/win32/lib/win32/resolv.rb b/ext/dl/win32/lib/win32/resolv.rb
index 6534d20760a..92336fac28f 100644
--- a/ext/dl/win32/lib/win32/resolv.rb
+++ b/ext/dl/win32/lib/win32/resolv.rb
@@ -11,7 +11,7 @@ module Win32
def self.get_hosts_path
path = get_hosts_dir
- path = File.join(path.gsub(/\\/, File::SEPARATOR), 'hosts')
+ path = File.expand_path('hosts', path)
File.exist?(path) ? path : nil
end