aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/requirement.rb
diff options
context:
space:
mode:
authorMarkus Reiter2017-04-27 10:44:44 +0200
committerMarkus Reiter2017-04-30 21:11:27 +0200
commitf8ad9d7efd5f3f489ed3c1671f16eb2a2eaef822 (patch)
treeb49a1211a472e686fed66010e2ddd38ca92cd2a9 /Library/Homebrew/requirement.rb
parent314483f75c8893eb68073f5863e7784797d6ea2a (diff)
downloadbrew-f8ad9d7efd5f3f489ed3c1671f16eb2a2eaef822.tar.bz2
Use `PATH` where possible.
Diffstat (limited to 'Library/Homebrew/requirement.rb')
-rw-r--r--Library/Homebrew/requirement.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/Library/Homebrew/requirement.rb b/Library/Homebrew/requirement.rb
index a4bdabdd1..6146382a3 100644
--- a/Library/Homebrew/requirement.rb
+++ b/Library/Homebrew/requirement.rb
@@ -96,7 +96,7 @@ class Requirement
# PATH.
parent = satisfied_result_parent
return unless parent
- return if ENV["PATH"].split(File::PATH_SEPARATOR).include?(parent.to_s)
+ return if PATH.new(ENV["PATH"]).to_a.include?(parent.to_s)
ENV.append_path("PATH", parent)
end
@@ -151,11 +151,11 @@ class Requirement
end
def which(cmd)
- super(cmd, ORIGINAL_PATHS.join(File::PATH_SEPARATOR))
+ super(cmd, PATH.new(ORIGINAL_PATHS))
end
def which_all(cmd)
- super(cmd, ORIGINAL_PATHS.join(File::PATH_SEPARATOR))
+ super(cmd, PATH.new(ORIGINAL_PATHS))
end
class << self