diff options
| author | Mike McQuaid | 2016-08-16 17:00:38 +0100 |
|---|---|---|
| committer | Mike McQuaid | 2016-08-17 10:27:45 +0100 |
| commit | ed5e2ea3003acc858e0886cb1c4a944f44ba598e (patch) | |
| tree | 95f1e594da10a22a371d614ac20388ecc0966000 /Library/Homebrew/utils/curl.rb | |
| parent | 495da233d74d2eea37deb35d5e28bc3e4c5a3b0e (diff) | |
| download | brew-ed5e2ea3003acc858e0886cb1c4a944f44ba598e.tar.bz2 | |
utils/curl: assume Ruby 2.
Diffstat (limited to 'Library/Homebrew/utils/curl.rb')
| -rw-r--r-- | Library/Homebrew/utils/curl.rb | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/Library/Homebrew/utils/curl.rb b/Library/Homebrew/utils/curl.rb index db3534542..68474c976 100644 --- a/Library/Homebrew/utils/curl.rb +++ b/Library/Homebrew/utils/curl.rb @@ -21,14 +21,8 @@ end def curl_output(*args) curl_args = curl_args(args) - curl_args -= ["--fail"] - if RUBY_TWO - curl_args -= ["--silent"] - Open3.popen3(*curl_args) do |_, stdout, stderr, wait_thread| - [stdout.read, stderr.read, wait_thread.value] - end - else - output = Utils.popen_read_text(*curl_args) - [output, nil, $?] + curl_args -= ["--fail", "--silent"] + Open3.popen3(*curl_args) do |_, stdout, stderr, wait_thread| + [stdout.read, stderr.read, wait_thread.value] end end |
