summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_continuation.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/ruby/test_continuation.rb b/test/ruby/test_continuation.rb
index 64390d8177..5e5b78cc82 100644
--- a/test/ruby/test_continuation.rb
+++ b/test/ruby/test_continuation.rb
@@ -78,10 +78,13 @@ class TestContinuation < Test::Unit::TestCase
end
def tracing_with_set_trace_func
+ orig_thread = Thread.current
cont = nil
func = lambda do |*args|
- @memo += 1
- cont.call(nil)
+ if orig_thread == Thread.current
+ @memo += 1
+ cont.call(nil)
+ end
end
cont = callcc { |cc| cc }
if cont