* eval.c (setup_exception): "mesg == sysstack_error" and
sysstack_error_p(mesg) are duplicated. r46502 seems to want to use latter. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e3e359ba79
commit
e5e37ecfc2
@ -1,3 +1,9 @@
|
|||||||
|
Tue Jun 24 06:17:52 2014 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
|
* eval.c (setup_exception): "mesg == sysstack_error" and
|
||||||
|
sysstack_error_p(mesg) are duplicated.
|
||||||
|
r46502 seems to want to use latter.
|
||||||
|
|
||||||
Tue Jun 24 06:15:36 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Tue Jun 24 06:15:36 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* ext/tk/tcltklib.c: fix format specifiers for VALUE and
|
* ext/tk/tcltklib.c: fix format specifiers for VALUE and
|
||||||
|
12
eval.c
12
eval.c
@ -492,17 +492,6 @@ setup_exception(rb_thread_t *th, int tag, volatile VALUE mesg, VALUE cause)
|
|||||||
file = rb_sourcefile();
|
file = rb_sourcefile();
|
||||||
if (file) line = rb_sourceline();
|
if (file) line = rb_sourceline();
|
||||||
if (file && !NIL_P(mesg)) {
|
if (file && !NIL_P(mesg)) {
|
||||||
if (mesg == sysstack_error) {
|
|
||||||
ID func = rb_frame_this_func();
|
|
||||||
at = rb_enc_sprintf(rb_usascii_encoding(), "%s:%d", file, line);
|
|
||||||
if (func) {
|
|
||||||
VALUE name = rb_id2str(func);
|
|
||||||
if (name) rb_str_catf(at, ":in `%"PRIsVALUE"'", name);
|
|
||||||
}
|
|
||||||
at = rb_ary_new3(1, at);
|
|
||||||
rb_iv_set(mesg, "bt", at);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (sysstack_error_p(mesg) || NIL_P(at = get_backtrace(mesg))) {
|
if (sysstack_error_p(mesg) || NIL_P(at = get_backtrace(mesg))) {
|
||||||
at = rb_vm_backtrace_object();
|
at = rb_vm_backtrace_object();
|
||||||
if (OBJ_FROZEN(mesg)) {
|
if (OBJ_FROZEN(mesg)) {
|
||||||
@ -512,7 +501,6 @@ setup_exception(rb_thread_t *th, int tag, volatile VALUE mesg, VALUE cause)
|
|||||||
set_backtrace(mesg, at);
|
set_backtrace(mesg, at);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (!NIL_P(mesg)) {
|
if (!NIL_P(mesg)) {
|
||||||
th->errinfo = mesg;
|
th->errinfo = mesg;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user