From e047e53b436eaed1c323c037ad3abcbe7ef67f71 Mon Sep 17 00:00:00 2001 From: William Morgan Date: Sat, 29 Dec 2007 19:11:14 -0800 Subject: [PATCH] better documentation for Thread#first_useful_descendent --- lib/sup/thread.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/sup/thread.rb b/lib/sup/thread.rb index 880feb6..4d92ad3 100644 --- a/lib/sup/thread.rb +++ b/lib/sup/thread.rb @@ -185,6 +185,10 @@ class Container def root?; @parent.nil?; end def root; root? ? self : @parent.root; end + ## skip over any containers which are empty and have only one child. we use + ## this make the threaded display a little nicer, and only stick in the + ## "missing message" line when it's graphically necessary, i.e. when the + ## missing message has more than one descendent. def first_useful_descendant if empty? && @children.size == 1 @children.first.first_useful_descendant -- 2.45.2