diff options
author | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-07-21 12:12:53 +0000 |
---|---|---|
committer | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-07-21 12:12:53 +0000 |
commit | 1d9cac36ea4d84a6e3242c7b8a30d05b6df64145 (patch) | |
tree | ebabedc68d72fac5c489f8c2b815b7d45ea812e3 /thread.c | |
parent | f0353afdc1f94393338ac07ed2dc02c71ed951c5 (diff) |
* backport r32597 from trunk.
* thread.c (set_trace_func, thread_set_trace_func_m): reset tracing
state when set_trace_func hook is removed. This is workaround patch
to force to reset tracing state that is broken by continuation call.
a patch from James M. Lawrence. [Feature #4347] [ruby-core:34998]
* test/ruby/test_continuation.rb (class TestContinuation): add a test
for above. a patch from James M. Lawrence.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32599 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread.c')
-rw-r--r-- | thread.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -4347,6 +4347,7 @@ set_trace_func(VALUE obj, VALUE trace) rb_remove_event_hook(call_trace_func); if (NIL_P(trace)) { + GET_THREAD()->tracing = EVENT_RUNNING_NOTHING; return Qnil; } @@ -4403,6 +4404,7 @@ thread_set_trace_func_m(VALUE obj, VALUE trace) rb_threadptr_remove_event_hook(th, call_trace_func); if (NIL_P(trace)) { + th->tracing = EVENT_RUNNING_NOTHING; return Qnil; } thread_add_trace_func(th, trace); |