mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
33e6f434ed
commit
c0ce877365
2 changed files with 7 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
|||
Tue Jun 11 07:13:13 2013 Masaya Tarui <tarui@ruby-lang.org>
|
||||
|
||||
* eval_error.c (error_print): keep that errat is non-shady object.
|
||||
and guard errat from GC.
|
||||
|
||||
Tue Jun 11 05:04:25 2013 Benoit Daloze <eregontp@gmail.com>
|
||||
|
||||
* ext/racc/cparse/cparse.c: use rb_ary_entry() and
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in a new issue