1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

vm_eval.c: check exceptional condition first

* vm_eval.c (vm_call_super): check exceptional condition first.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36642 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2012-08-06 12:18:10 +00:00
parent 906b2110d9
commit 281e4b611f

View file

@ -160,14 +160,12 @@ vm_call_super(rb_thread_t *th, int argc, const VALUE *argv)
rb_method_entry_t *me;
rb_control_frame_t *cfp = th->cfp;
if (!cfp->iseq && !NIL_P(cfp->klass)) {
klass = RCLASS_SUPER(cfp->klass);
id = cfp->me->def->original_id;
}
else {
if (cfp->iseq || NIL_P(cfp->klass)) {
rb_bug("vm_call_super: should not be reached");
}
klass = RCLASS_SUPER(cfp->klass);
id = cfp->me->def->original_id;
me = rb_method_entry(klass, id, &klass);
if (!me) {
return method_missing(recv, id, argc, argv, NOEX_SUPER);