summaryrefslogtreecommitdiff
path: root/lib/chef/resource/registry_key.rb
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2019-07-02 15:11:54 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2019-07-02 15:11:54 -0700
commite71560df5cebbfb209089c6255e37e65f0e34d95 (patch)
tree5cd0a1d01eb9609d7f5681b2e04faa902de67e84 /lib/chef/resource/registry_key.rb
parent7a1a6c8ef26c787e4b6dd1602f3d158b37e81720 (diff)
downloadchef-e71560df5cebbfb209089c6255e37e65f0e34d95.tar.gz
Style/SymbolArray
start enforcing using %i{} instead of arrays of symbols Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/resource/registry_key.rb')
-rw-r--r--lib/chef/resource/registry_key.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/chef/resource/registry_key.rb b/lib/chef/resource/registry_key.rb
index cd4edda5a9..a5c99313bf 100644
--- a/lib/chef/resource/registry_key.rb
+++ b/lib/chef/resource/registry_key.rb
@@ -88,7 +88,7 @@ class Chef
raise ArgumentError, "Missing name key in RegistryKey values hash" unless v.key?(:name)
v.each_key do |key|
- raise ArgumentError, "Bad key #{key} in RegistryKey values hash" unless [:name, :type, :data].include?(key)
+ raise ArgumentError, "Bad key #{key} in RegistryKey values hash" unless %i{name type data}.include?(key)
end
raise ArgumentError, "Type of name => #{v[:name]} should be string" unless v[:name].is_a?(String)
@@ -103,7 +103,7 @@ class Chef
end
property :recursive, [TrueClass, FalseClass], default: false
- property :architecture, Symbol, default: :machine, equal_to: [:machine, :x86_64, :i386]
+ property :architecture, Symbol, default: :machine, equal_to: %i{machine x86_64 i386}
private
@@ -123,7 +123,7 @@ class Chef
# Some data types may raise errors when sent as json. Returns true if this
# value's data may need to be converted to a checksum.
def needs_checksum?(value)
- unsafe_types = [:binary, :dword, :dword_big_endian, :qword]
+ unsafe_types = %i{binary dword dword_big_endian qword}
unsafe_types.include?(value[:type])
end