summaryrefslogtreecommitdiff
path: root/eval_error.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-07-26 16:13:33 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-07-26 16:13:33 +0000
commitac10d41a67461d5855ca20021e3fd84e44d4e8ef (patch)
treef245a5f9cd6899fd19663ef995414c00e8f9d792 /eval_error.c
parentc56b3d14181d0627cd044a21906fdb191a7f83f7 (diff)
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
Diffstat (limited to 'eval_error.c')
-rw-r--r--eval_error.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/eval_error.c b/eval_error.c
index 8bcbd39..0c323c2 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);