summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/resource.rb6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/puppet/resource.rb b/lib/puppet/resource.rb
index 6ffaa2f3b..393211e09 100644
--- a/lib/puppet/resource.rb
+++ b/lib/puppet/resource.rb
@@ -213,11 +213,7 @@ class Puppet::Resource
end
def uniqueness_key
- h = {}
- key_attributes.each do |attribute|
- h[attribute] = self.to_hash[attribute]
- end
- return h
+ self.to_hash.values_at(*key_attributes.sort_by { |k| k.to_s })
end
def key_attributes