Skip to content

Commit 308a163

Browse files
committed
Allow print_tree for non-root nodes
1 parent f9efa8c commit 308a163

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/tree.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -934,7 +934,7 @@ def <=>(other)
934934
# @param [Integer] max_depth optional maximum depth at which the printing
935935
# with stop.
936936
# @param [Proc] block optional block to use for rendering
937-
def print_tree(level = 0, max_depth = nil,
937+
def print_tree(level = node_depth, max_depth = nil,
938938
block = lambda { |node, prefix|
939939
puts "#{prefix} #{node.name}" })
940940
prefix = ''

0 commit comments

Comments
 (0)