summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vm.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/vm.c b/vm.c
index 15b305e8b9..076bbbe3d8 100644
--- a/vm.c
+++ b/vm.c
@@ -2658,11 +2658,10 @@ static void
thread_compact(void *ptr)
{
rb_thread_t *th = ptr;
- rb_fiber_update_self(th->ec->fiber_ptr);
- if (th->root_fiber) rb_fiber_update_self(th->root_fiber);
-
- rb_execution_context_update(th->ec);
+ if (!th->root_fiber) {
+ rb_execution_context_update(th->ec);
+ }
}
static void