summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-11-23 17:03:08 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-11-23 17:03:08 +0000
commit9519f6193a940a736036ff0fe03d45b81d1dc4e8 (patch)
tree5990cbe6652a64c9fc44fa7b21cd4e7eb43237c9 /io.c
parentbe5bbaf5dc30933117ca671a9b5a795e3adad6cc (diff)
io.c: preserve encodings
* io.c (must_respond_to): preserve encodings of variable name and class name in warning message. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/io.c b/io.c
index 228a2e8129..f21b9211b8 100644
--- a/io.c
+++ b/io.c
@@ -7275,9 +7275,9 @@ static void
must_respond_to(ID mid, VALUE val, ID id)
{
if (!rb_respond_to(val, mid)) {
- rb_raise(rb_eTypeError, "%s must have %s method, %s given",
- rb_id2name(id), rb_id2name(mid),
- rb_obj_classname(val));
+ rb_raise(rb_eTypeError, "%"PRIsVALUE" must have %"PRIsVALUE" method, %"PRIsVALUE" given",
+ rb_id2str(id), rb_id2str(mid),
+ rb_obj_class(val));
}
}