diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-05-06 08:54:36 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-05-06 08:54:36 +0000 |
commit | d03eabd52010b25e7a53c832792338ebe6ce2ead (patch) | |
tree | ab5979ec7db50af5bb717994791b1b202427c67d /eval.c | |
parent | 854fffe9e5c80c51b3ae78da6b69f071218ed380 (diff) | |
download | ruby-d03eabd52010b25e7a53c832792338ebe6ce2ead.tar.gz |
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
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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); } |