diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2016-11-15 15:13:44 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2016-12-06 13:08:26 -0800 |
commit | 76427185b3dddfc9901dc2cbe5f1f7a6c9af661c (patch) | |
tree | 7f2023a7a04cb4491f82c1d5493128b071e2cf71 /lib/chef/cookbook/metadata.rb | |
parent | 7a3ca23fd977ca4f894cba54f76d64a77562f012 (diff) | |
download | chef-76427185b3dddfc9901dc2cbe5f1f7a6c9af661c.tar.gz |
fix Style/NilComparison
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/cookbook/metadata.rb')
-rw-r--r-- | lib/chef/cookbook/metadata.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/cookbook/metadata.rb b/lib/chef/cookbook/metadata.rb index 02f9831d70..65307c455b 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 |