ruby-changes:34041
From: akr <ko1@a...>
Date: Mon, 26 May 2014 01:16:43 +0900 (JST)
Subject: [ruby-changes:34041] akr:r46122 (trunk): Show leaked threads line-by-line.
akr 2014-05-26 01:16:38 +0900 (Mon, 26 May 2014) New Revision: 46122 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=46122 Log: Show leaked threads line-by-line. Modified files: trunk/ChangeLog trunk/test/lib/minitest/unit.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 46121) +++ ChangeLog (revision 46122) @@ -1,6 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 -Mon May 26 01:02:09 2014 Tanaka Akira <akr@f...> +Mon May 26 01:07:51 2014 Tanaka Akira <akr@f...> - * 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 <akr@f...> Index: test/lib/minitest/unit.rb =================================================================== --- test/lib/minitest/unit.rb (revision 46121) +++ test/lib/minitest/unit.rb (revision 46122) @@ -974,8 +974,10 @@ module MiniTest https://github.com/ruby/ruby/blob/trunk/test/lib/minitest/unit.rb#L974 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 https://github.com/ruby/ruby/blob/trunk/test/lib/minitest/unit.rb#L1000 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}" } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/