summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/ruby/test_settracefunc.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/ruby/test_settracefunc.rb b/test/ruby/test_settracefunc.rb
index 47cab56b51..3480ef2d4a 100644
--- a/test/ruby/test_settracefunc.rb
+++ b/test/ruby/test_settracefunc.rb
@@ -456,6 +456,9 @@ class TestSetTraceFunc < Test::Unit::TestCase
bug3921 = '[ruby-dev:42350]'
ok = false
func = lambda{|e, f, l, i, b, k|
+ # In parallel testing, unexpected events like IO operations may be traced,
+ # so we filter out events here.
+ next unless f == __FILE__
set_trace_func(nil)
ok = eval("self", b)
}