зеркало из https://github.com/github/ruby.git
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
This commit is contained in:
Родитель
c56b3d1418
Коммит
ac10d41a67
|
@ -226,7 +226,7 @@ void
|
||||||
rb_print_undef(VALUE klass, ID id, int scope)
|
rb_print_undef(VALUE klass, ID id, int scope)
|
||||||
{
|
{
|
||||||
const char *v = method_scope_name(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),
|
QUOTE_ID(id),
|
||||||
(RB_TYPE_P(klass, T_MODULE)) ? "module" : "class",
|
(RB_TYPE_P(klass, T_MODULE)) ? "module" : "class",
|
||||||
rb_class_name(klass));
|
rb_class_name(klass));
|
||||||
|
@ -235,7 +235,7 @@ rb_print_undef(VALUE klass, ID id, int scope)
|
||||||
void
|
void
|
||||||
rb_print_undef_str(VALUE klass, VALUE name)
|
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),
|
QUOTE(name),
|
||||||
(RB_TYPE_P(klass, T_MODULE)) ? "module" : "class",
|
(RB_TYPE_P(klass, T_MODULE)) ? "module" : "class",
|
||||||
rb_class_name(klass));
|
rb_class_name(klass));
|
||||||
|
@ -245,8 +245,8 @@ void
|
||||||
rb_print_inaccessible(VALUE klass, ID id, int scope)
|
rb_print_inaccessible(VALUE klass, ID id, int scope)
|
||||||
{
|
{
|
||||||
const char *v = method_scope_name(scope);
|
const char *v = method_scope_name(scope);
|
||||||
rb_name_error(id, "method `%s' for %s `% "PRIsVALUE"' is %s",
|
rb_name_error(id, "method `%"PRIsVALUE"' for %s `% "PRIsVALUE"' is %s",
|
||||||
rb_id2name(id),
|
QUOTE_ID(id),
|
||||||
(RB_TYPE_P(klass, T_MODULE)) ? "module" : "class",
|
(RB_TYPE_P(klass, T_MODULE)) ? "module" : "class",
|
||||||
rb_class_name(klass),
|
rb_class_name(klass),
|
||||||
v);
|
v);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче