Merge pull request #1685 from MikeMcQuaid/utils-path-string

which_all: don't assume path is a string.
This commit is contained in:
Mike McQuaid 2016-12-18 11:16:02 -08:00 committed by GitHub
commit 5aeb7125c4

View File

@ -300,7 +300,7 @@ def which(cmd, path = ENV["PATH"])
end
def which_all(cmd, path = ENV["PATH"])
path.split(File::PATH_SEPARATOR).map do |p|
path.to_s.split(File::PATH_SEPARATOR).map do |p|
begin
pcmd = File.expand_path(cmd, p)
rescue ArgumentError