summaryrefslogtreecommitdiff
path: root/cont.c
diff options
context:
space:
mode:
Diffstat (limited to 'cont.c')
-rw-r--r--cont.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/cont.c b/cont.c
index e340677fba..bcc33a1530 100644
--- a/cont.c
+++ b/cont.c
@@ -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;