lib/filetree/simple_tree.rb in filetree-0.0.1 vs lib/filetree/simple_tree.rb in filetree-0.0.2
- old
+ new
@@ -107,9 +107,10 @@
# Return an array containing every ancestor of the current node.
#
def ancestors
d = Array.new
current = self.parent()
+ d << current
until d.include?(current.parent)
current = current.parent
d << current
end
\ No newline at end of file