From ce2df5b4f1daa038d3a3b77cc829ecce1a5d7c7e Mon Sep 17 00:00:00 2001 From: Lamont Granquist Date: Thu, 19 Feb 2015 16:27:41 -0800 Subject: make comparison really strict must be object identity and use #equals? off of the NULL_ARG object in case arg defines some insanely overridden methods. --- lib/chef/mixin/params_validate.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/chef/mixin/params_validate.rb b/lib/chef/mixin/params_validate.rb index b96e1fb978..baf210bfc5 100644 --- a/lib/chef/mixin/params_validate.rb +++ b/lib/chef/mixin/params_validate.rb @@ -85,7 +85,7 @@ class Chef def nillable_set_or_return(symbol, arg, validation) iv_symbol = "@#{symbol.to_s}".to_sym - if arg == NULL_ARG + if NULL_ARG.equal?(arg) if self.instance_variable_defined?(iv_symbol) == true get_ivar(iv_symbol, symbol, validation) else -- cgit v1.2.1