summaryrefslogtreecommitdiff
path: root/lib/chef/mixin
diff options
context:
space:
mode:
authorJohn Keiser <john@johnkeiser.com>2015-06-15 17:27:11 -0700
committerJohn Keiser <john@johnkeiser.com>2015-06-23 15:26:14 -0700
commit705e22b975196baa6decf23f9c3a7e676d6aefc4 (patch)
treebac88ce7328d23a9c31e6f49114249ac7f396985 /lib/chef/mixin
parent0a29c389d8dbc7c61fed13671e636480b8dd850e (diff)
downloadchef-705e22b975196baa6decf23f9c3a7e676d6aefc4.tar.gz
Freeze default constants
Diffstat (limited to 'lib/chef/mixin')
-rw-r--r--lib/chef/mixin/params_validate.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/chef/mixin/params_validate.rb b/lib/chef/mixin/params_validate.rb
index 3edc761ffc..c1a792b235 100644
--- a/lib/chef/mixin/params_validate.rb
+++ b/lib/chef/mixin/params_validate.rb
@@ -316,6 +316,7 @@ class Chef
def _pv_default(opts, key, default_value)
value = _pv_opts_lookup(opts, key)
if value.nil?
+ default_value = default_value.freeze if !default_value.is_a?(DelayedEvaluator)
opts[key] = default_value
end
end