Bug #4881 ยป raise_super_outside_of_method.patch
vm_insnhelper.c | ||
---|---|---|
}
|
||
while (lcfp->iseq != iseq) {
|
||
rb_thread_t *th = GET_THREAD();
|
||
VALUE *tdfp = GET_PREV_DFP(lcfp->dfp);
|
||
while (1) {
|
||
lcfp = RUBY_VM_PREVIOUS_CONTROL_FRAME(lcfp);
|
||
if (RUBY_VM_CONTROL_FRAME_STACK_OVERFLOW_P(th, lcfp)) {
|
||
rb_raise(rb_eNoMethodError,
|
||
"super called outside of method");
|
||
}
|
||
if (lcfp->dfp == tdfp) {
|
||
break;
|
||
}
|