diff options
author | tarui <tarui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-06-10 22:14:27 +0000 |
---|---|---|
committer | tarui <tarui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-06-10 22:14:27 +0000 |
commit | c0ce87736511ca51e453509c25fe3c00abb08059 (patch) | |
tree | 982678153dbfe8b56988c024f3de70cc72c98cac /eval_error.c | |
parent | 33e6f434edd95e1d2711ae5fe4d0e04300b1c736 (diff) |
* eval_error.c (error_print): keep that errat is non-shady object.
and guard errat from GC.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41224 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval_error.c')
-rw-r--r-- | eval_error.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/eval_error.c b/eval_error.c index aa9d10f91d..c18ae34228 100644 --- a/eval_error.c +++ b/eval_error.c @@ -177,7 +177,6 @@ error_print(void) if (!NIL_P(errat)) { long i; long len = RARRAY_LEN(errat); - VALUE *ptr = RARRAY_PTR(errat); int skip = eclass == rb_eSysStackError; #define TRACE_MAX (TRACE_HEAD+TRACE_TAIL+5) @@ -185,8 +184,8 @@ error_print(void) #define TRACE_TAIL 5 for (i = 1; i < len; i++) { - if (RB_TYPE_P(ptr[i], T_STRING)) { - warn_printf("\tfrom %s\n", RSTRING_PTR(ptr[i])); + if (RB_TYPE_P(RARRAY_AREF(errat,i), T_STRING)) { + warn_printf("\tfrom %s\n", RSTRING_PTR(RARRAY_AREF(errat,i))); } if (skip && i == TRACE_HEAD && len > TRACE_MAX) { warn_printf("\t ... %ld levels...\n", |