diff options
author | Josh Hudson <jhudson@chef.io> | 2016-02-26 14:20:19 -0700 |
---|---|---|
committer | Josh Hudson <jhudson@chef.io> | 2016-02-26 14:20:19 -0700 |
commit | 6aa6c8945828deb50b2143ddf46f70697b9076fd (patch) | |
tree | 710ac573c7c9def92bb95c2433987ae7bcac2ecf /lib/chef | |
parent | 5f72ac57337bd4914d87a48bdfb49c2d1d039951 (diff) | |
download | chef-6aa6c8945828deb50b2143ddf46f70697b9076fd.tar.gz |
Fix a bug that was causing DataBagItem.to_hash to mutate the data bag itemjjh/databag_item_to_hash_non_mutating
Diffstat (limited to 'lib/chef')
-rw-r--r-- | lib/chef/data_bag_item.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/data_bag_item.rb b/lib/chef/data_bag_item.rb index 0e3fa48e68..6ac863a47d 100644 --- a/lib/chef/data_bag_item.rb +++ b/lib/chef/data_bag_item.rb @@ -107,9 +107,9 @@ class Chef end def to_hash - result = self.raw_data + result = self.raw_data.dup result["chef_type"] = "data_bag_item" - result["data_bag"] = self.data_bag + result["data_bag"] = self.data_bag.to_s result end |