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

ruby-changes:29174

From: nobu <ko1@a...>
Date: Tue, 11 Jun 2013 15:57:14 +0900 (JST)
Subject: [ruby-changes:29174] nobu:r41226 (trunk): * eval_error.c (error_print): reduce RARRAY_AREF().

nobu	2013-06-11 15:57:04 +0900 (Tue, 11 Jun 2013)

  New Revision: 41226

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

  Log:
    * eval_error.c (error_print): reduce RARRAY_AREF().

  Modified files:
    trunk/eval_error.c

Index: eval_error.c
===================================================================
--- eval_error.c	(revision 41225)
+++ eval_error.c	(revision 41226)
@@ -184,8 +184,9 @@ error_print(void) https://github.com/ruby/ruby/blob/trunk/eval_error.c#L184
 #define TRACE_TAIL 5
 
 	for (i = 1; i < len; i++) {
-	    if (RB_TYPE_P(RARRAY_AREF(errat,i), T_STRING)) {
-		warn_printf("\tfrom %s\n", RSTRING_PTR(RARRAY_AREF(errat,i)));
+	    VALUE line = RARRAY_AREF(errat, i);
+	    if (RB_TYPE_P(line, T_STRING)) {
+		warn_printf("\tfrom %s\n", RSTRING_PTR(line));
 	    }
 	    if (skip && i == TRACE_HEAD && len > TRACE_MAX) {
 		warn_printf("\t ... %ld levels...\n",

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

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