summaryrefslogtreecommitdiff
path: root/eval_error.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-11 06:57:04 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-11 06:57:04 +0000
commit4cdd6f6ab8abb1b960a7cdbe3f932b6a792787a5 (patch)
tree384b583edf6a97a492b52aa67ba47760c7be9c96 /eval_error.c
parentdf4abd9b3b4d5ac061f098adedbf185ecd223909 (diff)
* eval_error.c (error_print): reduce RARRAY_AREF().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval_error.c')
-rw-r--r--eval_error.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/eval_error.c b/eval_error.c
index c18ae34..86e9464 100644
--- a/eval_error.c
+++ b/eval_error.c
@@ -184,8 +184,9 @@ error_print(void)
#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",