From c8660d896698e31a62ad9c149213e315a70a1035 Mon Sep 17 00:00:00 2001 From: akr Date: Sun, 25 May 2014 16:16:38 +0000 Subject: [PATCH] Show leaked threads line-by-line. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46122 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++-- test/lib/minitest/unit.rb | 8 +++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6f273dec01..eb6e7b0a8f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ -Mon May 26 01:02:09 2014 Tanaka Akira +Mon May 26 01:07:51 2014 Tanaka Akira - * test/lib/minitest/unit.rb: Show leaked tempfiles line-by-line. + * test/lib/minitest/unit.rb: Show leaked threads and tempfiles + line-by-line. Sun May 25 23:02:06 2014 Tanaka Akira diff --git a/test/lib/minitest/unit.rb b/test/lib/minitest/unit.rb index 27c71b136b..a27926b3c7 100644 --- a/test/lib/minitest/unit.rb +++ b/test/lib/minitest/unit.rb @@ -974,8 +974,10 @@ module MiniTest end thread_retained = live2 - live1 if !thread_retained.empty? - list = thread_retained.map {|t| ' ' + t.inspect }.sort.join - puts "Leaked threads: #{inst.class}\##{inst.__name__}:#{list}" + list = thread_retained.map {|t| t.inspect }.sort + list.each {|str| + puts "Leaked thread: #{inst.class}\##{inst.__name__}: #{str}" + } end live2 end @@ -998,7 +1000,7 @@ module MiniTest end tempfile_retained = live2 - live1 if !tempfile_retained.empty? - list = tempfile_retained.map {|t| ' ' + t.inspect }.sort + list = tempfile_retained.map {|t| t.inspect }.sort list.each {|str| puts "Leaked tempfile: #{name}: #{str}" }