summaryrefslogtreecommitdiff
path: root/lib/chef/cookbook/metadata.rb
diff options
context:
space:
mode:
authorThom May <thom@may.lt>2016-12-07 09:44:16 +0000
committerGitHub <noreply@github.com>2016-12-07 09:44:16 +0000
commit811cbff2baaf0c5f8ad78cbaf6e62db969842827 (patch)
tree5a824fdbcc06e2cf4633c77baacce0da1e779686 /lib/chef/cookbook/metadata.rb
parentfcb0ccc2480725f03c2f97c0eb5ebcf37e4b2f32 (diff)
parent6ec604f150023e93859af90dff08dba6dc624f79 (diff)
downloadchef-811cbff2baaf0c5f8ad78cbaf6e62db969842827.tar.gz
Merge pull request #5548 from chef/lcg/chefstyle-updates
Chefstyle updates
Diffstat (limited to 'lib/chef/cookbook/metadata.rb')
-rw-r--r--lib/chef/cookbook/metadata.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/cookbook/metadata.rb b/lib/chef/cookbook/metadata.rb
index b2f3db9b8e..c3698f3315 100644
--- a/lib/chef/cookbook/metadata.rb
+++ b/lib/chef/cookbook/metadata.rb
@@ -862,12 +862,12 @@ INVALID
return if !options[:choice].is_a?(Array) || options[:choice].empty?
if options[:default].is_a?(String) && options[:default] != ""
- raise ArgumentError, "Default must be one of your choice values!" if options[:choice].index(options[:default]) == nil
+ raise ArgumentError, "Default must be one of your choice values!" if options[:choice].index(options[:default]).nil?
end
if options[:default].is_a?(Array) && !options[:default].empty?
options[:default].each do |val|
- raise ArgumentError, "Default values must be a subset of your choice values!" if options[:choice].index(val) == nil
+ raise ArgumentError, "Default values must be a subset of your choice values!" if options[:choice].index(val).nil?
end
end
end