aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Nagel2013-04-16 14:18:07 -0500
committerJack Nagel2013-04-16 14:18:23 -0500
commit41b9734dc042efe08c17bbc92992b3be3fc9e7a3 (patch)
treeb66596f40311453a818b3ff203259a73ebf03ffe
parent9f52be6fb18a63a420a4e7c12c83a589f899deda (diff)
downloadhomebrew-41b9734dc042efe08c17bbc92992b3be3fc9e7a3.tar.bz2
Only dup and shift when specs hash is populated
-rw-r--r--Library/Homebrew/download_strategy.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb
index 9d6ebb931..17931f21d 100644
--- a/Library/Homebrew/download_strategy.rb
+++ b/Library/Homebrew/download_strategy.rb
@@ -4,7 +4,8 @@ require 'vendor/multi_json'
class AbstractDownloadStrategy
def initialize name, package
@url = package.url
- @spec, @ref = package.specs.dup.shift
+ specs = package.specs
+ @spec, @ref = specs.dup.shift unless specs.empty?
end
def expand_safe_system_args args