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

ruby-changes:36341

From: nobu <ko1@a...>
Date: Fri, 14 Nov 2014 15:55:19 +0900 (JST)
Subject: [ruby-changes:36341] nobu:r48422 (trunk): id.def: attrset

nobu	2014-11-14 15:55:05 +0900 (Fri, 14 Nov 2014)

  New Revision: 48422

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

  Log:
    id.def: attrset
    
    * defs/id.def: add attrset IDs, which no longer shares serial
      numbers with local name IDs.

  Modified files:
    trunk/defs/id.def
Index: defs/id.def
===================================================================
--- defs/id.def	(revision 48421)
+++ defs/id.def	(revision 48422)
@@ -73,6 +73,7 @@ instance_ids = [] https://github.com/ruby/ruby/blob/trunk/defs/id.def#L73
 global_ids = []
 const_ids = []
 class_ids = []
+attrset_ids = []
 names = {}
 predefined.split(/^/).each_with_index do |line, num|
   next if /^#/ =~ line
@@ -102,8 +103,7 @@ predefined.split(/^/).each_with_index do https://github.com/ruby/ruby/blob/trunk/defs/id.def#L103
   when /\A\$(?:\d+|(?!\d)\w+)\z/; global_ids
   when /\A@@(?!\d)\w+\z/; class_ids
   when /\A@(?!\d)\w+\z/; instance_ids
-  when /\A((?!\d)\w+)=\z/
-    KeywordError.raise("use ID2ATTRSET(#{$1}) instead of ATTRSET #{name}", firstline+num)
+  when /\A((?!\d)\w+)=\z/; attrset_ids
   else preserved_ids
   end << token
   predefined_ids[token] = name
@@ -114,6 +114,7 @@ end https://github.com/ruby/ruby/blob/trunk/defs/id.def#L114
   "GLOBAL" => global_ids,
   "CONST" => const_ids,
   "CLASS" => class_ids,
+  "ATTRSET" => attrset_ids,
   :preserved => preserved_ids,
   :predefined => predefined_ids,
 }

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

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