diff options
author | 卜部昌平 <shyouhei@ruby-lang.org> | 2019-07-31 23:15:56 +0900 |
---|---|---|
committer | 卜部昌平 <shyouhei@ruby-lang.org> | 2019-08-01 16:00:59 +0900 |
commit | 19d3c80e8136402a26b52c8da46eee071ec413d6 (patch) | |
tree | 7649a44bf5ff014070e525e922d09fe12d3567f2 /vm.c | |
parent | 5d33f787169bcc3594d2264726695d58c4a06899 (diff) |
calc_lineno(): add assertions
This function has a lot of assumptions. Should make them sure.
Diffstat (limited to 'vm.c')
-rw-r--r-- | vm.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1343,7 +1343,7 @@ rb_source_location(int *pline) const rb_execution_context_t *ec = GET_EC(); const rb_control_frame_t *cfp = rb_vm_get_ruby_level_next_cfp(ec, ec->cfp); - if (cfp && cfp->iseq) { + if (cfp && VM_FRAME_RUBYFRAME_P(cfp)) { if (pline) *pline = rb_vm_get_sourceline(cfp); return rb_iseq_path(cfp->iseq); } |