From 6f8900d2931acfb96b810904572aecc675d28168 Mon Sep 17 00:00:00 2001 From: Luke Kanies Date: Fri, 24 Apr 2009 16:24:18 -0500 Subject: Always making sure graph edges appear first If we don't do this, there's a chance we'll get hit by the ruby yaml bug again. Signed-off-by: Luke Kanies --- lib/puppet/simple_graph.rb | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'lib/puppet') diff --git a/lib/puppet/simple_graph.rb b/lib/puppet/simple_graph.rb index 97098325b..dacea1a9f 100644 --- a/lib/puppet/simple_graph.rb +++ b/lib/puppet/simple_graph.rb @@ -360,7 +360,17 @@ class Puppet::SimpleGraph end def to_yaml_properties - instance_variables + 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 "@edges" + result.unshift "@edges" + + result end # Just walk the tree and pass each edge. -- cgit