aboutsummaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-05-06 08:54:36 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-05-06 08:54:36 +0000
commitd03eabd52010b25e7a53c832792338ebe6ce2ead (patch)
treeab5979ec7db50af5bb717994791b1b202427c67d /eval.c
parent854fffe9e5c80c51b3ae78da6b69f071218ed380 (diff)
downloadruby-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.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/eval.c b/eval.c
index 35397c2741..a7c5322567 100644
--- a/eval.c
+++ b/eval.c
@@ -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);
}