summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vm_backtrace.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/vm_backtrace.c b/vm_backtrace.c
index a0815f1d6c..a10f848daf 100644
--- a/vm_backtrace.c
+++ b/vm_backtrace.c
@@ -331,8 +331,7 @@ location_to_str(rb_backtrace_location_t *loc)
lineno = location_lineno(loc->body.cfunc.prev_loc);
}
else {
- rb_thread_t *th = GET_THREAD();
- file = th->vm->progname;
+ file = GET_VM()->progname;
lineno = INT2FIX(0);
}
name = rb_id2str(loc->body.cfunc.mid);
@@ -674,9 +673,7 @@ static void
oldbt_init(void *ptr, size_t dmy)
{
struct oldbt_arg *arg = (struct oldbt_arg *)ptr;
- rb_thread_t *th = GET_THREAD();
-
- arg->filename = th->vm->progname;
+ arg->filename = GET_VM()->progname;
arg->lineno = 0;
}