diff options
| author | Markus Reiter | 2016-10-14 20:17:25 +0200 |
|---|---|---|
| committer | Markus Reiter | 2016-10-23 14:32:04 +0200 |
| commit | 2b7e6c1dcb2e1aa8416b9b26d1a3d77b68f65013 (patch) | |
| tree | 14a5f61e46199f8b38458d66b4431d4b388fc015 /Library | |
| parent | ae7b944238ca23aff13d29375e4c59b32ae9d436 (diff) | |
| download | brew-2b7e6c1dcb2e1aa8416b9b26d1a3d77b68f65013.tar.bz2 | |
Don’t use `%i` literal.
Diffstat (limited to 'Library')
4 files changed, 4 insertions, 4 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/audit.rb b/Library/Homebrew/cask/lib/hbc/audit.rb index 0cb470370..ab2f1bce5 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 feb5a830a..d750f5af4 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 b1a850c5a..9e6368362 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 8516f0d38..2bb7ae633 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 } |
