From f39d8eb88c3750f894d0446c9bd6e1b581187cd4 Mon Sep 17 00:00:00 2001 From: Misty De Meo Date: Fri, 6 Jul 2012 11:54:15 -0500 Subject: [PATCH] DownloadStrategy: Detect classes --- Library/Homebrew/download_strategy.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index 7872a41082..b99a0b0051 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