aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2013-10-09 21:41:15 -0500
committerJack Nagel2013-10-09 21:41:15 -0500
commit0233def5452aca0a3213e657dc4d4d5efd75b064 (patch)
tree88991e41728bb41c9c28afde49adc88a8a89da6a /Library
parent0588dea2d39e58c93dbf0065dececbfe24ffedb5 (diff)
downloadhomebrew-0233def5452aca0a3213e657dc4d4d5efd75b064.tar.bz2
VCSDownloadStrategy: destructure spec hash more efficiently
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/download_strategy.rb7
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