Remove assignment to unused temporary variable

This commit is contained in:
Max Howell 2009-10-19 03:01:03 +01:00
parent ef02031d7c
commit 995c2d5a13

View File

@ -24,12 +24,9 @@
class AbstractDownloadStrategy class AbstractDownloadStrategy
def initialize url, name, version, specs def initialize url, name, version, specs
@url=url @url=url
case specs case specs when Hash
when Hash
@spec = specs.keys.first # only use first spec @spec = specs.keys.first # only use first spec
@ref = specs.values.first @ref = specs.values.first
else
spec = nil
end end
@unique_token="#{name}-#{version}" unless name.to_s.empty? or name == '__UNKNOWN__' @unique_token="#{name}-#{version}" unless name.to_s.empty? or name == '__UNKNOWN__'
end end