[前][次][番号順一覧][スレッド一覧]

ruby-changes:47038

From: ko1 <ko1@a...>
Date: Fri, 23 Jun 2017 14:52:31 +0900 (JST)
Subject: [ruby-changes:47038] ko1:r59153 (trunk): skip on other threads (again).

ko1	2017-06-23 14:52:28 +0900 (Fri, 23 Jun 2017)

  New Revision: 59153

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=59153

  Log:
    skip on other threads (again).

  Modified files:
    trunk/test/ruby/test_settracefunc.rb
Index: test/ruby/test_settracefunc.rb
===================================================================
--- test/ruby/test_settracefunc.rb	(revision 59152)
+++ test/ruby/test_settracefunc.rb	(revision 59153)
@@ -1604,7 +1604,7 @@ class TestSetTraceFunc < Test::Unit::Tes https://github.com/ruby/ruby/blob/trunk/test/ruby/test_settracefunc.rb#L1604
 
   def tp_return_value mid
     ary = []
-    TracePoint.new(:return, :b_return){|tp| ary << [tp.event, tp.method_id, tp.return_value]}.enable{
+    TracePoint.new(:return, :b_return){|tp| next if !target_thread?; ary << [tp.event, tp.method_id, tp.return_value]}.enable{
       send mid
     }
     ary.pop # last b_return event is not required.

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]