summaryrefslogtreecommitdiff
path: root/vm_backtrace.c
diff options
context:
space:
mode:
-rw-r--r--vm_backtrace.c14
1 files changed, 12 insertions, 2 deletions
@@ -33,8 +33,18 @@ inline static int
calc_lineno(const rb_iseq_t *iseq, const VALUE *pc)
{
size_t pos = (size_t)(pc - iseq->body->iseq_encoded);
- /* use pos-1 because PC points next instruction at the beginning of instruction */
- return rb_iseq_line_no(iseq, pos - 1);
}
int