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

* eval_error.h (error_print): show full stacktrace on

non-SystemStackError.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2007-06-19 23:27:47 +00:00
parent 9a7a11564c
commit f8e1e5389f
2 changed files with 7 additions and 1 deletions

View file

@ -1,3 +1,8 @@
Wed Jun 20 08:27:57 2007 Tanaka Akira <akr@fsij.org>
* eval_error.h (error_print): show full stacktrace on
non-SystemStackError.
Wed Jun 20 04:45:39 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
* parse.y (rb_intern2): use rb_intern2 to intern without trailing

View file

@ -155,6 +155,7 @@ error_print(void)
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)
#define TRACE_HEAD 8
@ -164,7 +165,7 @@ error_print(void)
if (TYPE(ptr[i]) == T_STRING) {
warn_printf("\tfrom %s\n", RSTRING_PTR(ptr[i]));
}
if (i == TRACE_HEAD && len > TRACE_MAX) {
if (skip && i == TRACE_HEAD && len > TRACE_MAX) {
warn_printf("\t ... %ld levels...\n",
len - TRACE_HEAD - TRACE_TAIL);
i = len - TRACE_TAIL;