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

ruby-changes:41909

From: nobu <ko1@a...>
Date: Wed, 2 Mar 2016 16:18:36 +0900 (JST)
Subject: [ruby-changes:41909] nobu:r53983 (trunk): vm_eval.c: method_missing by method_missing

nobu	2016-03-02 16:18:31 +0900 (Wed, 02 Mar 2016)

  New Revision: 53983

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=53983

  Log:
    vm_eval.c: method_missing by method_missing
    
    * vm_eval.c (vm_call0_body): calling method_missing method is
      method_missing().

  Modified files:
    trunk/ChangeLog
    trunk/vm_eval.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 53982)
+++ ChangeLog	(revision 53983)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Wed Mar  2 16:18:30 2016  Nobuyoshi Nakada  <nobu@r...>
+
+	* vm_eval.c (vm_call0_body): calling method_missing method is
+	  method_missing().
+
 Wed Mar  2 15:13:33 2016  herwinw  <herwin@q...>
 
 	* lib/xmlrpc.rb: Removed broken parser named XMLScanStreamParser.
Index: vm_eval.c
===================================================================
--- vm_eval.c	(revision 53982)
+++ vm_eval.c	(revision 53983)
@@ -222,14 +222,9 @@ vm_call0_body(rb_thread_t* th, struct rb https://github.com/ruby/ruby/blob/trunk/vm_eval.c#L222
 	goto again;
       case VM_METHOD_TYPE_MISSING:
 	{
-	    VALUE new_args = rb_ary_new4(calling->argc, argv);
-
-	    rb_ary_unshift(new_args, ID2SYM(ci->mid));
 	    th->passed_block = calling->blockptr;
-	    ret = rb_funcall2(calling->recv, idMethodMissing, calling->argc+1,
-	                      RARRAY_CONST_PTR(new_args));
-	    RB_GC_GUARD(new_args);
-	    return ret;
+	    return method_missing(calling->recv, ci->mid, calling->argc,
+				  argv, MISSING_NOENTRY);
 	}
       case VM_METHOD_TYPE_OPTIMIZED:
 	switch (cc->me->def->body.optimize_type) {

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

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