summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/thread.c b/thread.c
index 69cd673674..1b726687a0 100644
--- a/thread.c
+++ b/thread.c
@@ -3048,12 +3048,7 @@ vm_living_thread_num(rb_vm_t *vm)
int
rb_thread_alone(void)
{
- int num = 1;
- if (!list_empty(&GET_THREAD()->vm->living_threads)) {
- num = vm_living_thread_num(GET_THREAD()->vm);
- thread_debug("rb_thread_alone: %d\n", num);
- }
- return num == 1;
+ return vm_living_thread_num(GET_VM()) == 1;
}
/*