summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--test/ruby/test_continuation.rb7
2 files changed, 10 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 35bcc5fb784..cc2f3b0f014 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Mon Apr 30 23:05:53 2012 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
+
+ * test/ruby/test_continuation.rb (tracing_with_set_trace_func): don't
+ call Continuation from other threads. [ruby-dev:45596] [Bug #6382]
+
Mon Apr 30 21:09:06 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* configure.in (optflags): disable unsafe optimizations.
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