diff options
author | Luke Kanies <luke@madstop.com> | 2009-04-12 23:10:58 -0500 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2009-04-12 23:10:58 -0500 |
commit | 88ff9c6500e76fdda02e60262dd1571577c0b92b (patch) | |
tree | 3ec61f089d2a81da44b4f436fbab31cb68998889 /lib/puppet | |
parent | 36594fecd8e30f732f09bc940adbb4c686e314ba (diff) | |
download | puppet-88ff9c6500e76fdda02e60262dd1571577c0b92b.tar.gz puppet-88ff9c6500e76fdda02e60262dd1571577c0b92b.tar.xz puppet-88ff9c6500e76fdda02e60262dd1571577c0b92b.zip |
Fixing #2111 - SimpleGraph only creates valid adjacencies
The way this class was testing edges was
causing them to appear adjacencies to appear magically,
because it was only testing that a hash had a key, not that
the value had any edges.
This fixes the infinite recursion mentioned in #2111.
Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'lib/puppet')
-rw-r--r-- | lib/puppet/simple_graph.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/puppet/simple_graph.rb b/lib/puppet/simple_graph.rb index d6418e04f..bc81a6a65 100644 --- a/lib/puppet/simple_graph.rb +++ b/lib/puppet/simple_graph.rb @@ -29,7 +29,7 @@ class Puppet::SimpleGraph return @adjacencies[direction].values.flatten if options[:type] == :edges - return @adjacencies[direction].keys + return @adjacencies[direction].keys.reject { |vertex| @adjacencies[direction][vertex].empty? } end # Add an edge to our list. |