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

eval.c: method name

* eval.c (setup_exception): add the method name to system stack
  error message.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2014-05-06 08:54:36 +00:00
parent 854fffe9e5
commit d03eabd520

5
eval.c
View file

@ -487,7 +487,12 @@ setup_exception(rb_thread_t *th, int tag, volatile VALUE mesg, VALUE cause)
if (file) line = rb_sourceline();
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);
}