summaryrefslogtreecommitdiff
path: root/vm_backtrace.c
diff options
context:
space:
mode:
Diffstat (limited to 'vm_backtrace.c')
-rw-r--r--vm_backtrace.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/vm_backtrace.c b/vm_backtrace.c
index 6696391..595edc6 100644
--- a/vm_backtrace.c
+++ b/vm_backtrace.c
@@ -738,15 +738,8 @@ thread_backtrace_to_ary(int argc, VALUE *argv, VALUE thval, int to_str)
rb_thread_t *th;
GetThreadPtr(thval, th);
- switch (th->status) {
- case THREAD_RUNNABLE:
- case THREAD_STOPPED:
- case THREAD_STOPPED_FOREVER:
- break;
- case THREAD_TO_KILL:
- case THREAD_KILLED:
+ if (th->to_kill || th->status == THREAD_KILLED)
return Qnil;
- }
return vm_backtrace_to_ary(th, argc, argv, 0, 0, to_str);
}