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
commitf39d8eb88c3750f894d0446c9bd6e1b581187cd4 (patch)
treed4b476ca627b08b9871bae8281eacd659ff2fee0 /Library
parent44ccd122c25639ddd917c1aaed53b9e33b2ffa7d (diff)
downloadbrew-f39d8eb88c3750f894d0446c9bd6e1b581187cd4.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