summaryrefslogtreecommitdiff
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-06-06 09:37:59 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-06-06 09:37:59 +0000
commit65ac4a560232d0a042b60602abe0310c75831c6e (patch)
treefbbcf7f86657a28dc66b8a7fc9f653009e575729 /vm_insnhelper.c
parentab5f23f26c844aa89fb380191e8c70062cab60fa (diff)
vm_insnhelper.c: check symbol proc to throw
* vm_insnhelper.c (vm_throw_start): check if the iseq is symbol proc, class definition should not be a symbol proc. [ruby-core:75856] [Bug #12462] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55297 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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;
}