Unfortunately, again because of a Ruby bug (http://rubyforge.org/tracker/?group_id=426&atid=1698&func=detail&aid=8886) Ruby can't print yaml that it can read, if custom classes are used as keys in hashes, which Sets use internally.
Signed-off-by: Luke Kanies <[email protected]> --- lib/puppet/simple_graph.rb | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/puppet/simple_graph.rb b/lib/puppet/simple_graph.rb index 05420ea..9709832 100644 --- a/lib/puppet/simple_graph.rb +++ b/lib/puppet/simple_graph.rb @@ -102,7 +102,7 @@ class Puppet::SimpleGraph def initialize @vertices = {} - @edges = Set.new + @edges = [] end # Clear our graph. @@ -226,7 +226,7 @@ class Puppet::SimpleGraph def remove_vertex!(vertex) return nil unless vertex?(vertex) @vertices[vertex].edges.each { |edge| remove_edge!(edge) } - @edges.subtract(@vertices[vertex].edges) + @edges -= @vertices[vertex].edges @vertices[vertex].clear @vertices.delete(vertex) end @@ -276,7 +276,7 @@ class Puppet::SimpleGraph end def edges - @edges.to_a + @edges.dup end # Remove an edge from our graph. -- 1.6.1 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en -~----------~----~----~----~------~----~------~--~---
