incorrect line returned (0) in rb_vm_get_sourceline()
If rb_vm_get_sourceline() is called when cfp->pc is equal to cfp->iseq->iseq_encoded (IOW, on the first instruction), then zero will be returned as the line number.
I think that if:
iseq->insn_info_size > 0, and,
iseq->insn_info_table.position == 0,
should be returned.
This is actually broader than I described. It occurs whenever:
iseq->insn_info_size > 0
iseq->insn_info_table.position = cfp->pc - cfp->iseq->iseq_encoded
Never mind; I'm trying to fix another bug in the core and I'm calling rb_vm_get_sourceline() before the PC is incremented. Which cannot happen. Sorry for the noise.
- Status changed from Open to Rejected
Also available in: Atom