summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-04-30 14:09:36 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-04-30 14:09:36 +0000
commitc40e6f82579f54d0fb437876d875de87a2d16241 (patch)
tree532fadad0c2d9e3c73b16623262357b2cefa2cc6 /test
parent860cf7b8121bbb7ca4fa0191fef08587a826ba0c (diff)
* test/ruby/test_continuation.rb (tracing_with_set_trace_func): don't
call Continuation from other threads. [ruby-dev:45596] [Bug #6382] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 64390d81770..5e5b78cc82c 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