aboutsummaryrefslogtreecommitdiffstats
path: root/vm_method.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-11-25 18:58:05 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-11-25 18:58:05 +0000
commit91e2cd34d4a8f8bd624a7fcd25c34239c8e3b319 (patch)
treecb1350068e0877b89fcab30dd7cf46a72651113c /vm_method.c
parent606e855622c2694c6bf1a5cec59373bef0d0877e (diff)
downloadruby-91e2cd34d4a8f8bd624a7fcd25c34239c8e3b319.tar.gz
vm_method.c: preserve encodings
* vm_method.c (rb_mod_remove_method): preserve encodings of method name and class name in error messages. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_method.c')
-rw-r--r--vm_method.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/vm_method.c b/vm_method.c
index 1f397e3115..8af2198dbd 100644
--- a/vm_method.c
+++ b/vm_method.c
@@ -806,8 +806,8 @@ rb_mod_remove_method(int argc, VALUE *argv, VALUE mod)
VALUE v = argv[i];
ID id = rb_check_id(&v);
if (!id) {
- rb_name_error_str(v, "method `%s' not defined in %s",
- RSTRING_PTR(v), rb_class2name(mod));
+ rb_name_error_str(v, "method `%"PRIsVALUE"' not defined in %"PRIsVALUE,
+ v, rb_obj_class(mod));
}
remove_method(mod, id);
}