mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
internal.h: quote unprintable
* internal.h (QUOTE, QUOTE_ID): quote unprintable chars in strings and IDs. [Bug #7574] [ruby-dev:46749] * string.c (rb_str_quote_unprintable): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
1df33a4a5f
commit
6f02547d83
9 changed files with 168 additions and 96 deletions
12
eval_error.c
12
eval_error.c
|
@ -213,19 +213,19 @@ rb_print_undef(VALUE klass, ID id, int scope)
|
|||
case NOEX_PRIVATE: v = " private"; break;
|
||||
case NOEX_PROTECTED: v = " protected"; break;
|
||||
}
|
||||
rb_name_error(id, "undefined%s method `%s' for %s `%s'", v,
|
||||
rb_id2name(id),
|
||||
rb_name_error(id, "undefined%s method `%"PRIsVALUE"' for %s `%"PRIsVALUE"'", v,
|
||||
QUOTE_ID(id),
|
||||
(RB_TYPE_P(klass, T_MODULE)) ? "module" : "class",
|
||||
rb_class2name(klass));
|
||||
rb_class_name(klass));
|
||||
}
|
||||
|
||||
void
|
||||
rb_print_undef_str(VALUE klass, VALUE name)
|
||||
{
|
||||
rb_name_error_str(name, "undefined method `%s' for %s `%s'",
|
||||
RSTRING_PTR(name),
|
||||
rb_name_error_str(name, "undefined method `%"PRIsVALUE"' for %s `%"PRIsVALUE"'",
|
||||
QUOTE(name),
|
||||
(RB_TYPE_P(klass, T_MODULE)) ? "module" : "class",
|
||||
rb_class2name(klass));
|
||||
rb_class_name(klass));
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue