mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
Don’t use %i
literal.
This commit is contained in:
parent
ae7b944238
commit
2b7e6c1dcb
@ -47,7 +47,7 @@ module Hbc
|
|||||||
|
|
||||||
def check_required_stanzas
|
def check_required_stanzas
|
||||||
odebug "Auditing 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)
|
add_error "a #{sym} stanza is required" unless cask.send(sym)
|
||||||
end
|
end
|
||||||
add_error "at least one name stanza is required" if cask.name.empty?
|
add_error "at least one name stanza is required" if cask.name.empty?
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
module Hbc
|
module Hbc
|
||||||
class CLI
|
class CLI
|
||||||
class InternalAuditModifiedCasks < InternalUseBase
|
class InternalAuditModifiedCasks < InternalUseBase
|
||||||
RELEVANT_STANZAS = %i{version sha256 url appcast}.freeze
|
RELEVANT_STANZAS = [:version, :sha256, :url, :appcast].freeze
|
||||||
|
|
||||||
class << self
|
class << self
|
||||||
def needs_init?
|
def needs_init?
|
||||||
|
@ -36,7 +36,7 @@ module Hbc
|
|||||||
end
|
end
|
||||||
|
|
||||||
def respond_to?(method, include_private = false)
|
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
|
return false if method == :to_ary
|
||||||
@resolver.call.respond_to?(method, include_private)
|
@resolver.call.respond_to?(method, include_private)
|
||||||
end
|
end
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
describe Hbc::DSL::StanzaProxy do
|
describe Hbc::DSL::StanzaProxy do
|
||||||
let(:stanza_proxy) {
|
let(:stanza_proxy) {
|
||||||
described_class.new(Array) { %i{foo bar cake} }
|
described_class.new(Array) { [:foo, :bar, :cake] }
|
||||||
}
|
}
|
||||||
|
|
||||||
subject { stanza_proxy }
|
subject { stanza_proxy }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user