diff --git a/Library/Homebrew/cask/artifact/relocated.rb b/Library/Homebrew/cask/artifact/relocated.rb index 97bc0e8dda..ecb6ba3242 100644 --- a/Library/Homebrew/cask/artifact/relocated.rb +++ b/Library/Homebrew/cask/artifact/relocated.rb @@ -13,7 +13,7 @@ module Cask source_string, target_hash = args if target_hash - raise CaskInvalidError.new(cask) unless target_hash.respond_to?(:keys) + raise CaskInvalidError, cask unless target_hash.respond_to?(:keys) target_hash.assert_valid_keys(:target) end diff --git a/Library/Homebrew/utils/bottles.rb b/Library/Homebrew/utils/bottles.rb index a4ee5d9e7f..43fb16dd92 100644 --- a/Library/Homebrew/utils/bottles.rb +++ b/Library/Homebrew/utils/bottles.rb @@ -68,9 +68,9 @@ module Utils else bottle_json_path = Pathname(bottle_file.sub(/\.(\d+\.)?tar\.gz$/, ".json")) if bottle_json_path.exist? && - (bottle_json_path_contents = bottle_json_path.read.presence) && - (bottle_json = JSON.parse(bottle_json_path_contents).presence) && - bottle_json.is_a?(Hash) + (bottle_json_path_contents = bottle_json_path.read.presence) && + (bottle_json = JSON.parse(bottle_json_path_contents).presence) && + bottle_json.is_a?(Hash) bottle_json.keys.first.presence end end