diff options
| author | Jack Nagel | 2013-10-09 21:41:15 -0500 |
|---|---|---|
| committer | Jack Nagel | 2013-10-09 21:41:15 -0500 |
| commit | 0233def5452aca0a3213e657dc4d4d5efd75b064 (patch) | |
| tree | 88991e41728bb41c9c28afde49adc88a8a89da6a /Library | |
| parent | 0588dea2d39e58c93dbf0065dececbfe24ffedb5 (diff) | |
| download | homebrew-0233def5452aca0a3213e657dc4d4d5efd75b064.tar.bz2 | |
VCSDownloadStrategy: destructure spec hash more efficiently
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/download_strategy.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index 6fc519c5f..09530d280 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -49,8 +49,11 @@ end class VCSDownloadStrategy < AbstractDownloadStrategy def initialize name, resource super - specs = resource.specs - @ref_type, @ref = specs.dup.shift unless specs.empty? + @ref_type, @ref = destructure_spec_hash(resource.specs) + end + + def destructure_spec_hash(spec) + spec.each { |o| return o } end end |
