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

ruby-changes:37617

From: nobu <ko1@a...>
Date: Mon, 23 Feb 2015 16:05:26 +0900 (JST)
Subject: [ruby-changes:37617] nobu:r49698 (trunk): vm_args.c: rb_exc_set_backtrace

nobu	2015-02-23 16:05:19 +0900 (Mon, 23 Feb 2015)

  New Revision: 49698

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

  Log:
    vm_args.c: rb_exc_set_backtrace
    
    * vm_args.c (raise_argument_error): call rb_exc_set_backtrace
      directly instead of funcall.

  Modified files:
    trunk/vm_args.c
Index: vm_args.c
===================================================================
--- vm_args.c	(revision 49697)
+++ vm_args.c	(revision 49698)
@@ -667,6 +667,8 @@ setup_parameters_complex(rb_thread_t * c https://github.com/ruby/ruby/blob/trunk/vm_args.c#L667
     return opt_pc;
 }
 
+VALUE rb_exc_set_backtrace(VALUE exc, VALUE bt);
+
 static void
 raise_argument_error(rb_thread_t *th, const rb_iseq_t *iseq, const VALUE exc)
 {
@@ -683,7 +685,7 @@ raise_argument_error(rb_thread_t *th, co https://github.com/ruby/ruby/blob/trunk/vm_args.c#L685
     }
 
     rb_ivar_set(exc, idBt_locations, at);
-    rb_funcall(exc, rb_intern("set_backtrace"), 1, at);
+    rb_exc_set_backtrace(exc, at);
     rb_exc_raise(exc);
 }
 

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

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