ruby-changes:24591
From: nobu <ko1@a...>
Date: Mon, 6 Aug 2012 21:18:28 +0900 (JST)
Subject: [ruby-changes:24591] nobu:r36642 (trunk): vm_eval.c: check exceptional condition first
nobu 2012-08-06 21:18:10 +0900 (Mon, 06 Aug 2012) New Revision: 36642 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=36642 Log: vm_eval.c: check exceptional condition first * vm_eval.c (vm_call_super): check exceptional condition first. Modified files: trunk/vm_eval.c Index: vm_eval.c =================================================================== --- vm_eval.c (revision 36641) +++ vm_eval.c (revision 36642) @@ -160,14 +160,12 @@ 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); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/