Don’t use %i literal.

This commit is contained in:
Markus Reiter 2016-10-14 20:17:25 +02:00
parent ae7b944238
commit 2b7e6c1dcb
4 changed files with 4 additions and 4 deletions

View File

@ -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?

View File

@ -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?

View File

@ -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

View File

@ -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 }