diff options
| author | Jack Nagel | 2014-04-01 16:03:07 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-04-01 16:03:07 -0500 |
| commit | 75526697199420576bf2358e99ff3fe4edea176c (patch) | |
| tree | 11c3fee62a8382092b1f7672fac7fc83af5bd927 /Library | |
| parent | f1601f6d8a2160c6889755151eb6b5b8159ac6ee (diff) | |
| download | brew-75526697199420576bf2358e99ff3fe4edea176c.tar.bz2 | |
Remove now unnecessary branching from bottle DSL methods
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/software_spec.rb | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/Library/Homebrew/software_spec.rb b/Library/Homebrew/software_spec.rb index 3c30c3b06..aff8060f4 100644 --- a/Library/Homebrew/software_spec.rb +++ b/Library/Homebrew/software_spec.rb @@ -164,13 +164,9 @@ class BottleSpecification # a Hash, which indicates the platform the checksum applies on. Checksum::TYPES.each do |cksum| class_eval <<-EOS, __FILE__, __LINE__ + 1 - def #{cksum}(val=nil) - return collector if val.nil? - case val - when Hash - key, value = val.shift - collector.add(Checksum.new(:#{cksum}, key), value) - end + def #{cksum}(val) + digest, tag = val.shift + collector.add(Checksum.new(:#{cksum}, digest), tag) cksum, current_tag = collector.fetch_bottle_for(bottle_tag) @checksum = cksum if cksum |
