CurlDownloadStrategy: no need to to_s, name should never be nil

This commit is contained in:
Jack Nagel 2013-10-12 20:19:21 -05:00
parent fd59925567
commit bf93748c6a

View File

@ -72,7 +72,7 @@ class CurlDownloadStrategy < AbstractDownloadStrategy
end end
def tarball_path def tarball_path
@tarball_path ||= if name.to_s.empty? || name == '__UNKNOWN__' @tarball_path ||= if name.empty? || name == '__UNKNOWN__'
Pathname.new("#{HOMEBREW_CACHE}/#{basename_without_params}") Pathname.new("#{HOMEBREW_CACHE}/#{basename_without_params}")
else else
Pathname.new("#{HOMEBREW_CACHE}/#{name}-#{resource.version}#{ext}") Pathname.new("#{HOMEBREW_CACHE}/#{name}-#{resource.version}#{ext}")