diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-02-26 05:10:46 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-02-26 05:10:46 +0000 |
commit | a8cb9b02a0ad6c9bb656ce5154c5483de36f5b12 (patch) | |
tree | 555909c564464258db2d0b1424c26e177d084525 /eval.c | |
parent | 651b394a12fba26b9c64676978f9b2b3205c0b14 (diff) | |
download | ruby-a8cb9b02a0ad6c9bb656ce5154c5483de36f5b12.tar.gz |
eval.c: preserve encoding
* eval.c (setup_exception): preserve exception class name encoding
in debug mode messages.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -518,16 +518,16 @@ setup_exception(rb_thread_t *th, int tag, volatile VALUE mesg, VALUE cause) e = rb_obj_as_string(e); th->errinfo = mesg; if (file && line) { - warn_printf("Exception `%s' at %s:%d - %"PRIsVALUE"\n", - rb_obj_classname(th->errinfo), file, line, e); + warn_printf("Exception `%"PRIsVALUE"' at %s:%d - %"PRIsVALUE"\n", + rb_obj_class(mesg), file, line, e); } else if (file) { - warn_printf("Exception `%s' at %s - %"PRIsVALUE"\n", - rb_obj_classname(th->errinfo), file, e); + warn_printf("Exception `%"PRIsVALUE"' at %s - %"PRIsVALUE"\n", + rb_obj_class(mesg), file, e); } else { - warn_printf("Exception `%s' - %"PRIsVALUE"\n", - rb_obj_classname(th->errinfo), e); + warn_printf("Exception `%"PRIsVALUE"' - %"PRIsVALUE"\n", + rb_obj_class(mesg), e); } } POP_TAG(); |