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

ruby-changes:33690

From: nobu <ko1@a...>
Date: Thu, 1 May 2014 19:53:25 +0900 (JST)
Subject: [ruby-changes:33690] nobu:r45771 (trunk): parse.y: show symbol name

nobu	2014-05-01 19:53:18 +0900 (Thu, 01 May 2014)

  New Revision: 45771

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

  Log:
    parse.y: show symbol name
    
    * parse.y (must_be_dynamic_symbol): show the name if it is a
      static symbol.

  Modified files:
    trunk/parse.y
Index: parse.y
===================================================================
--- parse.y	(revision 45770)
+++ parse.y	(revision 45771)
@@ -10457,6 +10457,9 @@ static ID intern_str(VALUE str); https://github.com/ruby/ruby/blob/trunk/parse.y#L10457
 static void
 must_be_dynamic_symbol(VALUE x)
 {
+    if (STATIC_SYM_P(x)) {
+	rb_raise(rb_eTypeError, "wrong argument %+"PRIsVALUE" (expected dynamic Symbol)", x);
+    }
     if (SPECIAL_CONST_P(x) || BUILTIN_TYPE(x) != T_SYMBOL) {
 	rb_raise(rb_eTypeError, "wrong argument type %s (expected Symbol)",
 		 rb_builtin_class_name(x));

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

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