diff options
| author | Misty De Meo | 2012-07-06 11:54:15 -0500 |
|---|---|---|
| committer | Misty De Meo | 2012-07-06 12:02:08 -0500 |
| commit | f39d8eb88c3750f894d0446c9bd6e1b581187cd4 (patch) | |
| tree | d4b476ca627b08b9871bae8281eacd659ff2fee0 /Library | |
| parent | 44ccd122c25639ddd917c1aaed53b9e33b2ffa7d (diff) | |
| download | brew-f39d8eb88c3750f894d0446c9bd6e1b581187cd4.tar.bz2 | |
DownloadStrategy: Detect classes
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/download_strategy.rb | 6 |
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 |
