From b026a472a36576adff838873f19e2d5d10a60853 Mon Sep 17 00:00:00 2001 From: John Keiser Date: Mon, 1 Feb 2016 13:11:31 -0800 Subject: Simplify fix for property_type with defaults `property_type(is: [:a, :b], default: :c)` was broken because ParamsValidate requires its input to have a name and property types don't have one. --- lib/chef/property.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/chef/property.rb b/lib/chef/property.rb index 68d9b80103..e32d15a9f5 100644 --- a/lib/chef/property.rb +++ b/lib/chef/property.rb @@ -467,7 +467,7 @@ class Chef resource.validate({ name => value }, { name => validation_options }) else name = self.name || :property_type - (resource || Chef::Mixin::ParamsValidate).validate({ name => value }, { name => validation_options }) + Chef::Mixin::ParamsValidate.validate({ name => value }, { name => validation_options }) end end end -- cgit v1.2.1