aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/download_strategy.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb
index 7872a4108..b99a0b005 100644
--- a/Library/Homebrew/download_strategy.rb
+++ b/Library/Homebrew/download_strategy.rb
@@ -578,9 +578,9 @@ class DownloadStrategyDetector
end
def detect
- case @strategy
- when AbstractDownloadStrategy then @strategy
- when Symbol then detect_from_symbol
+ if @strategy.is_a? Class and @strategy.ancestors.include? AbstractDownloadStrategy
+ @strategy
+ elsif @strategy.is_a? Symbol then detect_from_symbol
else detect_from_url
end
end