Project

General

Profile

Actions

Bug #14369

closed

Win32::Resolv.get_hosts_path may return nil, causing Resolv to fail

Added by docwhat (Christian Höltje) about 6 years ago. Updated about 6 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:84907]

Description

Win32::Resolv.get_hosts_path() may return nil.

The Resolv class uses that to get the hosts filename which is used as the default when initializing Hosts as @filename.

However, File.open(@filename, 'rb') is always called, even if @filename is nil.

This causes the error: TypeError: no implicit conversion of nil into String

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0