summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/resource.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/puppet/resource.rb b/lib/puppet/resource.rb
index f991f539d..d2979f930 100644
--- a/lib/puppet/resource.rb
+++ b/lib/puppet/resource.rb
@@ -60,7 +60,11 @@ class Puppet::Resource
# Don't duplicate the title as the namevar
next hash if param == namevar and value == title
- hash[param] = value
+ if value.is_a? Puppet::Resource
+ hash[param] = value.to_s
+ else
+ hash[param] = value
+ end
hash
end