ruby-changes:48670
From: ko1 <ko1@a...>
Date: Thu, 16 Nov 2017 13:37:08 +0900 (JST)
Subject: [ruby-changes:48670] ko1:r60786 (trunk): fix up r60782 and r60783.
ko1 2017-11-16 13:37:02 +0900 (Thu, 16 Nov 2017) New Revision: 60786 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=60786 Log: fix up r60782 and r60783. * cont.c (cont_restore_thread): re-check a condition (pointed by nobu). Modified files: trunk/cont.c Index: cont.c =================================================================== --- cont.c (revision 60785) +++ cont.c (revision 60786) @@ -706,13 +706,12 @@ cont_restore_thread(rb_context_t *cont) https://github.com/ruby/ruby/blob/trunk/cont.c#L706 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; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/