summaryrefslogtreecommitdiffstats
path: root/lib/puppet/resource
diff options
context:
space:
mode:
authorBrice Figureau <brice-puppet@daysofwonder.com>2009-05-01 16:59:51 +0200
committerJames Turnbull <james@lovedthanlost.net>2009-05-02 09:08:00 +1000
commita1c0ae0fe3c4bef6f21240c4d0a8da985cc7c8af (patch)
tree089ead1cdd48bb6dd21e7abe07acc7ab041b50dc /lib/puppet/resource
parentbf054e1b2c0117135de5f54421c112523e83a88c (diff)
downloadpuppet-a1c0ae0fe3c4bef6f21240c4d0a8da985cc7c8af.tar.gz
puppet-a1c0ae0fe3c4bef6f21240c4d0a8da985cc7c8af.tar.xz
puppet-a1c0ae0fe3c4bef6f21240c4d0a8da985cc7c8af.zip
Fix #2218 - Ruby YAML bug prevents reloading catalog in puppetd
Because of ruby bug: http://rubyforge.org/tracker/?group_id=426&atid=1698&func=detail&aid=8886 and http://redmine.ruby-lang.org/issues/show/1331 YAML dump of hashes using ruby objects as keys is incorrect leading to an error when deserializing the YAML in puppetd. The error is easy to correct by a post-process fix-up of the generated YAML, which transforms: &id004 !ruby/object:Puppet::Relationship ? to the correct: ? &id004 !ruby/object:Puppet::Relationship Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
Diffstat (limited to 'lib/puppet/resource')
-rw-r--r--lib/puppet/resource/catalog.rb14
1 files changed, 0 insertions, 14 deletions
diff --git a/lib/puppet/resource/catalog.rb b/lib/puppet/resource/catalog.rb
index 32fbc38d6..4f60f6e56 100644
--- a/lib/puppet/resource/catalog.rb
+++ b/lib/puppet/resource/catalog.rb
@@ -417,20 +417,6 @@ class Puppet::Resource::Catalog < Puppet::SimpleGraph
super
end
- def to_yaml_properties
- result = instance_variables
-
- # There's a ruby bug that hits us without this:
- # http://rubyforge.org/tracker/?group_id=426&atid=1698&func=detail&aid=8886
- # We need our resources to show up in as values in a hash
- # before they show up as keys, because otherwise
- # the loading fails.
- result.delete "@resource_table"
- result.unshift "@resource_table"
-
- result
- end
-
private
def cleanup