From 0233def5452aca0a3213e657dc4d4d5efd75b064 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Wed, 9 Oct 2013 21:41:15 -0500 Subject: VCSDownloadStrategy: destructure spec hash more efficiently --- Library/Homebrew/download_strategy.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'Library') 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 -- cgit v1.2.3