diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-07-26 16:13:33 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-07-26 16:13:33 +0000 |
commit | ac10d41a67461d5855ca20021e3fd84e44d4e8ef (patch) | |
tree | f245a5f9cd6899fd19663ef995414c00e8f9d792 /eval_error.c | |
parent | c56b3d14181d0627cd044a21906fdb191a7f83f7 (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.c | 8 |
1 files changed, 4 insertions, 4 deletions
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); |