From dca8dc5bf50c508eadf051d4316cec12dacf7674 Mon Sep 17 00:00:00 2001 From: Kevin Abel Date: Tue, 9 Jan 2018 20:11:52 -0600 Subject: [PATCH] Fix audit --- Library/Homebrew/download_strategy.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index 6869d33703..3419475445 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -304,7 +304,7 @@ class AbstractFileDownloadStrategy < AbstractDownloadStrategy # https://example.com/download.php?file=foo-1.0.tar.gz # the extension we want is ".tar.gz", not ".php". url_pathname = Pathname.new(@url) - while !ext = url_pathname.extname[/[^?]+/] + until ext = url_pathname.extname[/[^?]+/] url_pathname = url_pathname.dirname end ext