From 91e2cd34d4a8f8bd624a7fcd25c34239c8e3b319 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 25 Nov 2014 18:58:05 +0000 Subject: 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 --- vm_method.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'vm_method.c') 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); } -- cgit v1.2.3