From 8086b525acc199123250bc0782160ba137986e79 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 1 Sep 2010 03:56:39 +0000 Subject: * thread.c (ruby_suppress_tracing): restore the state and invoke the func with normal state. a patch from Satoshi Shiba at [ruby-dev:42162]. [ruby-core:31783] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_trace.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'test/ruby/test_trace.rb') diff --git a/test/ruby/test_trace.rb b/test/ruby/test_trace.rb index 45bc599314..775c458fb1 100644 --- a/test/ruby/test_trace.rb +++ b/test/ruby/test_trace.rb @@ -46,4 +46,16 @@ class TestTrace < Test::Unit::TestCase ensure untrace_var :$x end + + def test_trace_break + bug2722 = '[ruby-core:31783]' + a = Object.new.extend(Enumerable) + def a.each + yield + end + assert(Thread.start { + Thread.current.add_trace_func(proc{}) + a.any? {true} + }.value, bug2722) + end end -- cgit v1.2.3