[前][次][番号順一覧][スレッド一覧]

ruby-changes:32684

From: nobu <ko1@a...>
Date: Thu, 30 Jan 2014 19:32:39 +0900 (JST)
Subject: [ruby-changes:32684] nobu:r44763 (trunk): vm_eval.c: fix NoMethodError message

nobu	2014-01-30 19:32:32 +0900 (Thu, 30 Jan 2014)

  New Revision: 44763

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=44763

  Log:
    vm_eval.c: fix NoMethodError message
    
    * vm_eval.c (vm_call0_body): reuse method type.

  Modified files:
    trunk/vm_eval.c
Index: vm_eval.c
===================================================================
--- vm_eval.c	(revision 44762)
+++ vm_eval.c	(revision 44763)
@@ -188,8 +188,8 @@ vm_call0_body(rb_thread_t* th, rb_call_i https://github.com/ruby/ruby/blob/trunk/vm_eval.c#L188
       case VM_METHOD_TYPE_ZSUPER:
       case VM_METHOD_TYPE_REFINED:
 	{
-	    int ex = ci->me->def->type == VM_METHOD_TYPE_ZSUPER ? NOEX_SUPER : 0;
-	    if (ci->me->def->type == VM_METHOD_TYPE_REFINED &&
+	    const rb_method_type_t type = ci->me->def->type;
+	    if (type == VM_METHOD_TYPE_REFINED &&
 		ci->me->def->body.orig_me) {
 		ci->me = ci->me->def->body.orig_me;
 		goto again;
@@ -198,6 +198,7 @@ vm_call0_body(rb_thread_t* th, rb_call_i https://github.com/ruby/ruby/blob/trunk/vm_eval.c#L198
 	    ci->defined_class = RCLASS_SUPER(ci->defined_class);
 
 	    if (!ci->defined_class || !(ci->me = rb_method_entry(ci->defined_class, ci->mid, &ci->defined_class))) {
+		int ex = VM_METHOD_TYPE_ZSUPER ? NOEX_SUPER : 0;
 		ret = method_missing(ci->recv, ci->mid, ci->argc, argv, ex);
 		goto success;
 	    }

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]