1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
nobu 2013-06-11 06:57:04 +00:00
parent df4abd9b3b
commit 4cdd6f6ab8

View file

@ -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",