1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

fix up r60782 and r60783.

* cont.c (cont_restore_thread): re-check a condition (pointed by nobu).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ko1 2017-11-16 04:37:02 +00:00
parent 7fbab01f77
commit c761514c76

9
cont.c
View file

@ -706,13 +706,12 @@ cont_restore_thread(rb_context_t *cont)
th->ec->errinfo = sec->errinfo;
/* trace on -> trace off */
if (sec->trace_arg == NULL && th->ec->trace_arg != NULL) {
if (th->ec->trace_arg != NULL && sec->trace_arg == NULL) {
GET_VM()->trace_running--;
}
else { /* sec->trace_arg == NULL */
if (th->ec->trace_arg != NULL) {
GET_VM()->trace_running++;
}
/* trace off -> trace on */
else if (th->ec->trace_arg == NULL && sec->trace_arg != NULL) {
GET_VM()->trace_running++;
}
th->ec->trace_arg = sec->trace_arg;