summaryrefslogtreecommitdiff
path: root/lib/chef/property.rb
diff options
context:
space:
mode:
authorJohn Keiser <john@johnkeiser.com>2015-09-25 16:26:10 -0700
committerJohn Keiser <john@johnkeiser.com>2015-09-25 16:26:10 -0700
commitcf5e1d000979b9f0004eea4020c8d1d375b4a4c0 (patch)
tree1337870391211fe7d9dd2a8f3e4c8a7238ea0de5 /lib/chef/property.rb
parent2c083878547343a4ed423e7d20ecbf6059285721 (diff)
downloadchef-cf5e1d000979b9f0004eea4020c8d1d375b4a4c0.tar.gz
Use 2.0-compatible Hash rather than to_h
Diffstat (limited to 'lib/chef/property.rb')
-rw-r--r--lib/chef/property.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/property.rb b/lib/chef/property.rb
index f6160d6954..2b151b350a 100644
--- a/lib/chef/property.rb
+++ b/lib/chef/property.rb
@@ -94,7 +94,7 @@ class Chef
raise ArgumentError, "Cannot specify both name_property and name_attribute together on property #{options[:name]}#{options[:declared_in] ? " of resource #{options[:declared_in].resource_name}" : ""}."
end
# replace name_property with name_attribute in place
- options = options.map { |k,v| k == :name_attribute ? [ :name_property, v ] : [ k,v ] }.to_h
+ options = Hash[options.map { |k,v| k == :name_attribute ? [ :name_property, v ] : [ k,v ] }]
end
# Only pick the first of :default, :name_property and :name_attribute if