summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/chef/mixin/params_validate.rb1
-rw-r--r--spec/unit/property_spec.rb8
2 files changed, 2 insertions, 7 deletions
diff --git a/lib/chef/mixin/params_validate.rb b/lib/chef/mixin/params_validate.rb
index 4ab016249f..84dcfcef13 100644
--- a/lib/chef/mixin/params_validate.rb
+++ b/lib/chef/mixin/params_validate.rb
@@ -317,7 +317,6 @@ 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
diff --git a/spec/unit/property_spec.rb b/spec/unit/property_spec.rb
index ce0552c564..bce2b0b51b 100644
--- a/spec/unit/property_spec.rb
+++ b/spec/unit/property_spec.rb
@@ -367,14 +367,10 @@ describe "Chef::Resource.property" do
expect(resource.x.object_id).to eq(value.object_id)
end
it "Multiple instances of x receive the exact same value" do
+ # TODO this isn't really great behavior, but it's noted here so we find out
+ # if it changed.
expect(resource.x.object_id).to eq(resource_class.new('blah2').x.object_id)
end
- it "The default value is frozen" do
- expect(resource.x).to be_frozen
- end
- it "The default value cannot be written to" do
- expect { resource.x[:a] = 1 }.to raise_error RuntimeError, /frozen/
- end
end
with_property ':x, default: lazy { {} }' do