--- thread.c~ 2011-03-12 13:09:57.000000000 +0200 +++ thread.c 2011-03-12 13:18:44.416043982 +0200 @@ -2074,17 +2074,21 @@ * either a symbol or a string name. If the specified variable does not exist, * returns nil. * - * a = Thread.new { Thread.current["name"] = "A"; Thread.stop } - * b = Thread.new { Thread.current[:name] = "B"; Thread.stop } - * c = Thread.new { Thread.current["name"] = "C"; Thread.stop } - * Thread.list.each {|x| puts "#{x.inspect}: #{x[:name]}" } + * a = Thread.new { Thread.current["name"] = "A" } + * b = Thread.new { Thread.current[:name] = "B" } + * c = Thread.new { Thread.current["name"] = "C" } + * + * Thread.list.each do |thr| + * thr.join unless thr == Thread.main + * puts "#{thr.inspect}: #{thr[:name]}" + * end * * produces: * - * #: C - * #: B - * #: A - * #: + * #: + * #: A + * #: B + * #: C */ static VALUE