Skip to content

Commit

Permalink
Merge pull request evolve75#51 from ojab/master
Browse files Browse the repository at this point in the history
Allow print_tree for non-root nodes
  • Loading branch information
evolve75 committed Jul 8, 2015
2 parents f9efa8c + 308a163 commit 7eb8448
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/tree.rb
Original file line number Diff line number Diff line change
Expand Up @@ -934,7 +934,7 @@ def <=>(other)
# @param [Integer] max_depth optional maximum depth at which the printing
# with stop.
# @param [Proc] block optional block to use for rendering
def print_tree(level = 0, max_depth = nil,
def print_tree(level = node_depth, max_depth = nil,
block = lambda { |node, prefix|
puts "#{prefix} #{node.name}" })
prefix = ''
Expand Down

0 comments on commit 7eb8448

Please sign in to comment.