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:
parent
df4abd9b3b
commit
4cdd6f6ab8
1 changed files with 3 additions and 2 deletions
|
@ -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",
|
||||
|
|
Loading…
Reference in a new issue