summaryrefslogtreecommitdiff
path: root/error.c
diff options
context:
space:
mode:
Diffstat (limited to 'error.c')
-rw-r--r--error.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/error.c b/error.c
index e65e04fc10..eac254ca44 100644
--- a/error.c
+++ b/error.c
@@ -721,7 +721,8 @@ rb_check_backtrace(VALUE bt)
rb_raise(rb_eTypeError, err);
}
for (i=0;i<RARRAY_LEN(bt);i++) {
- if (!RB_TYPE_P(RARRAY_AREF(bt, i), T_STRING)) {
+ VALUE e = RARRAY_AREF(bt, i);
+ if (!RB_TYPE_P(e, T_STRING)) {
rb_raise(rb_eTypeError, err);
}
}