diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-11-25 18:44:22 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-11-25 18:44:22 +0000 |
commit | 606e855622c2694c6bf1a5cec59373bef0d0877e (patch) | |
tree | 48dd02c881d87e84e0e94aecfda1ee2628e7d152 /eval_error.c | |
parent | d0ac6d5879c8d2132a7419ff2b8a4fb3b3a28597 (diff) |
rb_id2str over rb_id2name
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48575 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval_error.c')
-rw-r--r-- | eval_error.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/eval_error.c b/eval_error.c index 0c323c21c7..6d43fe3c7c 100644 --- a/eval_error.c +++ b/eval_error.c @@ -22,20 +22,20 @@ warn_printf(const char *fmt, ...) static void error_pos(void) { - const char *sourcefile = rb_sourcefile(); + VALUE sourcefile = rb_sourcefilename(); int sourceline = rb_sourceline(); if (sourcefile) { ID caller_name; if (sourceline == 0) { - warn_printf("%s", sourcefile); + warn_printf("%"PRIsVALUE, sourcefile); } else if ((caller_name = rb_frame_callee()) != 0) { - warn_printf("%s:%d:in `%s'", sourcefile, sourceline, - rb_id2name(caller_name)); + warn_printf("%"PRIsVALUE":%d:in `%"PRIsVALUE"'", sourcefile, sourceline, + rb_id2str(caller_name)); } else { - warn_printf("%s:%d", sourcefile, sourceline); + warn_printf("%"PRIsVALUE":%d", sourcefile, sourceline); } } } |