diff --git a/Library/Homebrew/cask/lib/hbc/audit.rb b/Library/Homebrew/cask/lib/hbc/audit.rb index 0cb4703701..ab2f1bce54 100644 --- a/Library/Homebrew/cask/lib/hbc/audit.rb +++ b/Library/Homebrew/cask/lib/hbc/audit.rb @@ -47,7 +47,7 @@ module Hbc def check_required_stanzas odebug "Auditing required stanzas" - %i{version sha256 url homepage}.each do |sym| + [:version, :sha256, :url, :homepage].each do |sym| add_error "a #{sym} stanza is required" unless cask.send(sym) end add_error "at least one name stanza is required" if cask.name.empty? diff --git a/Library/Homebrew/cask/lib/hbc/cli/internal_audit_modified_casks.rb b/Library/Homebrew/cask/lib/hbc/cli/internal_audit_modified_casks.rb index feb5a830a6..d750f5af4d 100644 --- a/Library/Homebrew/cask/lib/hbc/cli/internal_audit_modified_casks.rb +++ b/Library/Homebrew/cask/lib/hbc/cli/internal_audit_modified_casks.rb @@ -1,7 +1,7 @@ module Hbc class CLI class InternalAuditModifiedCasks < InternalUseBase - RELEVANT_STANZAS = %i{version sha256 url appcast}.freeze + RELEVANT_STANZAS = [:version, :sha256, :url, :appcast].freeze class << self def needs_init? diff --git a/Library/Homebrew/cask/lib/hbc/dsl/stanza_proxy.rb b/Library/Homebrew/cask/lib/hbc/dsl/stanza_proxy.rb index b1a850c5aa..9e6368362e 100644 --- a/Library/Homebrew/cask/lib/hbc/dsl/stanza_proxy.rb +++ b/Library/Homebrew/cask/lib/hbc/dsl/stanza_proxy.rb @@ -36,7 +36,7 @@ module Hbc end def respond_to?(method, include_private = false) - return true if %i{encode_with proxy? to_s type}.include?(method) + return true if [:encode_with, :proxy?, :to_s, :type].include?(method) return false if method == :to_ary @resolver.call.respond_to?(method, include_private) end diff --git a/Library/Homebrew/cask/spec/cask/dsl/stanza_proxy_spec.rb b/Library/Homebrew/cask/spec/cask/dsl/stanza_proxy_spec.rb index 8516f0d382..2bb7ae6333 100644 --- a/Library/Homebrew/cask/spec/cask/dsl/stanza_proxy_spec.rb +++ b/Library/Homebrew/cask/spec/cask/dsl/stanza_proxy_spec.rb @@ -1,6 +1,6 @@ describe Hbc::DSL::StanzaProxy do let(:stanza_proxy) { - described_class.new(Array) { %i{foo bar cake} } + described_class.new(Array) { [:foo, :bar, :cake] } } subject { stanza_proxy }