diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-06-12 04:35:53 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-06-12 04:35:53 +0000 |
commit | 5ac27de1a8b88d286f584796867ece7eaabdce88 (patch) | |
tree | 564f539e7db05a2222460e0a7d4723c5eaa725ab /iseq.c | |
parent | ce5d2f0c569efc133d504e732a5cc7df071d6790 (diff) | |
download | ruby-5ac27de1a8b88d286f584796867ece7eaabdce88.tar.gz |
iseq.c: preserve encoding
* iseq.c (iseqw_inspect): preserve path encoding in the result.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59065 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'iseq.c')
-rw-r--r-- | iseq.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -983,14 +983,15 @@ static VALUE iseqw_inspect(VALUE self) { const rb_iseq_t *iseq = iseqw_check(self); + VALUE klass = rb_class_name(rb_obj_class(self)); if (!iseq->body->location.label) { - return rb_sprintf("#<%s: uninitialized>", rb_obj_classname(self)); + return rb_sprintf("#<%"PRIsVALUE": uninitialized>", klass); } else { - return rb_sprintf("<%s:%s@%s>", - rb_obj_classname(self), - RSTRING_PTR(iseq->body->location.label), RSTRING_PTR(rb_iseq_path(iseq))); + return rb_sprintf("<%"PRIsVALUE":%"PRIsVALUE"@%"PRIsVALUE">", + klass, + iseq->body->location.label, rb_iseq_path(iseq)); } } |