[前][次][番号順一覧][スレッド一覧]

ruby-changes:34880

From: nobu <ko1@a...>
Date: Sun, 27 Jul 2014 01:13:47 +0900 (JST)
Subject: [ruby-changes:34880] nobu:r46962 (trunk): eval_error.c: quote unprintable

nobu	2014-07-27 01:13:33 +0900 (Sun, 27 Jul 2014)

  New Revision: 46962

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=46962

  Log:
    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

  Modified files:
    trunk/eval_error.c
Index: eval_error.c
===================================================================
--- eval_error.c	(revision 46961)
+++ eval_error.c	(revision 46962)
@@ -226,7 +226,7 @@ void https://github.com/ruby/ruby/blob/trunk/eval_error.c#L226
 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 s https://github.com/ruby/ruby/blob/trunk/eval_error.c#L235
 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 https://github.com/ruby/ruby/blob/trunk/eval_error.c#L245
 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);

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]