diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-10-23 13:38:37 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-10-23 13:38:37 +0000 |
commit | 7f5d559cfc69a161a38666321123cc9c51bafb9c (patch) | |
tree | a59c6bd309e234240d961a1911517f417e7f38ac /thread.c | |
parent | b98fa0b2a52d8b8bb38611d6bace9fed986aea5f (diff) |
merges r29155 from trunk into ruby_1_9_2. fixes #3777, #3772 and #3722.
--
* thread.c (ruby_suppress_tracing): restore the state and invoke
the func with normal state. a patch from Satoshi Shiba <shiba
AT rvm.jp> at [ruby-dev:42162]. [ruby-core:31783]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@29574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread.c')
-rw-r--r-- | thread.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -4090,6 +4090,7 @@ ruby_suppress_tracing(VALUE (*func)(VALUE, int), VALUE arg, int always) rb_thread_t *th = GET_THREAD(); int state, tracing; volatile int raised; + volatile int outer_state; VALUE result = Qnil; if ((tracing = th->tracing) != 0 && !always) { @@ -4100,6 +4101,8 @@ ruby_suppress_tracing(VALUE (*func)(VALUE, int), VALUE arg, int always) } raised = rb_threadptr_reset_raised(th); + outer_state = th->state; + th->state = 0; PUSH_TAG(); if ((state = EXEC_TAG()) == 0) { @@ -4115,6 +4118,7 @@ ruby_suppress_tracing(VALUE (*func)(VALUE, int), VALUE arg, int always) if (state) { JUMP_TAG(state); } + th->state = outer_state; return result; } |