diff options
author | Phil Dibowitz <phil@ipom.com> | 2015-08-20 13:37:34 -0700 |
---|---|---|
committer | Phil Dibowitz <phil@ipom.com> | 2015-08-21 14:54:52 -0700 |
commit | b972d25ff0df05a96b9cb909fedd9047a4066642 (patch) | |
tree | b02a78304001df35c69c6a71eaffe370e50a4c01 /lib/chef/mixin | |
parent | 88752a692e8a17a44174e7f6411b58790684d141 (diff) | |
download | chef-b972d25ff0df05a96b9cb909fedd9047a4066642.tar.gz |
Validating is comparing to true instead of ruby truthiness
It should use truthiness.
Diffstat (limited to 'lib/chef/mixin')
-rw-r--r-- | lib/chef/mixin/params_validate.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/mixin/params_validate.rb b/lib/chef/mixin/params_validate.rb index 1b3a8ddcae..e3c7657b1b 100644 --- a/lib/chef/mixin/params_validate.rb +++ b/lib/chef/mixin/params_validate.rb @@ -315,7 +315,7 @@ class Chef value = _pv_opts_lookup(opts, key) if !value.nil? callbacks.each do |message, zeproc| - if zeproc.call(value) != true + unless zeproc.call(value) raise Exceptions::ValidationFailed, "Option #{key}'s value #{value} #{message}!" end end |