aboutsummaryrefslogtreecommitdiffstats
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r--vm_insnhelper.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index 691c37a3df..3841801c41 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -995,7 +995,9 @@ vm_throw_start(rb_thread_t *const th, rb_control_frame_t *const reg_cfp, enum ru
target_lep = lep;
}
- if (lep == target_lep && escape_cfp->iseq->body->type == ISEQ_TYPE_CLASS) {
+ if (lep == target_lep &&
+ RUBY_VM_NORMAL_ISEQ_P(escape_cfp->iseq) &&
+ escape_cfp->iseq->body->type == ISEQ_TYPE_CLASS) {
in_class_frame = 1;
target_lep = 0;
}