summaryrefslogtreecommitdiff
path: root/eval_error.c
diff options
context:
space:
mode:
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 c18ae34228..86e9464f3c 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",