aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMisty De Meo2012-07-06 11:54:15 -0500
committerMisty De Meo2012-07-06 12:02:08 -0500
commita26ca7b959418e6bd7bf498743fab4f8203301dc (patch)
tree9d51264dbf0abc47e081508f72346930ef693a70 /Library
parent2086abb9bfa6a2e44ab4a131d530ea3f5d5d571f (diff)
downloadhomebrew-a26ca7b959418e6bd7bf498743fab4f8203301dc.tar.bz2
DownloadStrategy: Detect classes
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