From ac10d41a67461d5855ca20021e3fd84e44d4e8ef Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 26 Jul 2014 16:13:33 +0000 Subject: eval_error.c: quote unprintable * eval_error.c (rb_print_undef, rb_print_undef_str): quote unprintable names. * eval_error.c (rb_print_inaccessible): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- eval_error.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'eval_error.c') diff --git a/eval_error.c b/eval_error.c index 8bcbd39c5e..0c323c21c7 100644 --- a/eval_error.c +++ b/eval_error.c @@ -226,7 +226,7 @@ void rb_print_undef(VALUE klass, ID id, int scope) { const char *v = method_scope_name(scope); - rb_name_error(id, "undefined%s method `%"PRIsVALUE"' for %s `%"PRIsVALUE"'", v, + rb_name_error(id, "undefined%s method `%"PRIsVALUE"' for %s `% "PRIsVALUE"'", v, QUOTE_ID(id), (RB_TYPE_P(klass, T_MODULE)) ? "module" : "class", rb_class_name(klass)); @@ -235,7 +235,7 @@ rb_print_undef(VALUE klass, ID id, int scope) void rb_print_undef_str(VALUE klass, VALUE name) { - rb_name_error_str(name, "undefined method `%"PRIsVALUE"' for %s `%"PRIsVALUE"'", + rb_name_error_str(name, "undefined method `%"PRIsVALUE"' for %s `% "PRIsVALUE"'", QUOTE(name), (RB_TYPE_P(klass, T_MODULE)) ? "module" : "class", rb_class_name(klass)); @@ -245,8 +245,8 @@ void rb_print_inaccessible(VALUE klass, ID id, int scope) { const char *v = method_scope_name(scope); - rb_name_error(id, "method `%s' for %s `% "PRIsVALUE"' is %s", - rb_id2name(id), + rb_name_error(id, "method `%"PRIsVALUE"' for %s `% "PRIsVALUE"' is %s", + QUOTE_ID(id), (RB_TYPE_P(klass, T_MODULE)) ? "module" : "class", rb_class_name(klass), v); -- cgit v1.2.3