summaryrefslogtreecommitdiff
path: root/error.c
diff options
context:
space:
mode:
Diffstat (limited to 'error.c')
-rw-r--r--error.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/error.c b/error.c
index 38d96ba4e7..87ac7a7132 100644
--- a/error.c
+++ b/error.c
@@ -443,8 +443,8 @@ check_backtrace(VALUE bt)
if (t != T_ARRAY) {
rb_raise(rb_eTypeError, err);
}
- for (i=0;i<RARRAY(bt)->len;i++) {
- if (TYPE(RARRAY(bt)->ptr[i]) != T_STRING) {
+ for (i=0;i<RARRAY_LEN(bt);i++) {
+ if (TYPE(RARRAY_PTR(bt)[i]) != T_STRING) {
rb_raise(rb_eTypeError, err);
}
}