Only dup and shift when specs hash is populated

This commit is contained in:
Jack Nagel 2013-04-16 14:18:07 -05:00
parent 0fb4f9c426
commit 1426b92a82

View File

@ -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