From 1cb59ea5fdd84ebec29ddd52a54c9c76dc8cac09 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Tue, 6 Nov 2012 19:00:54 -0600 Subject: Fix curlrc existence check Enumerable#one? is not available under Ruby 1.8.6. Further, we really want #any? here, as setting both HOME and CURL_HOME can trigger a false negative. Fixes Homebrew/homebrew#15883. --- Library/Homebrew/cmd/doctor.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb index 6f7b3a98b..7d1b96211 100644 --- a/Library/Homebrew/cmd/doctor.rb +++ b/Library/Homebrew/cmd/doctor.rb @@ -484,7 +484,7 @@ def check_user_path_3 end def check_user_curlrc - if %w[CURL_HOME HOME].one?{|key| ENV[key] and File.exists? "#{ENV[key]}/.curlrc" } then <<-EOS.undent + if %w[CURL_HOME HOME].any?{|key| ENV[key] and File.exists? "#{ENV[key]}/.curlrc" } then <<-EOS.undent You have a curlrc file If you have trouble downloading packages with Homebrew, then maybe this is the problem? If the following command doesn't work, then try removing -- cgit v1.2.3