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
commit3cda2158817c8d0f62dcc659388de12d834c067c (patch)
tree8b0d0cb5703da0f3c0509e8d95fa347a752b0a83 /Library
parent6c5a9ae0fb314f541319cb0b389f42ad86f52f85 (diff)
downloadbrew-3cda2158817c8d0f62dcc659388de12d834c067c.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