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

ruby-changes:34228

From: nobu <ko1@a...>
Date: Mon, 2 Jun 2014 09:51:39 +0900 (JST)
Subject: [ruby-changes:34228] nobu:r46289 (trunk): parse.y: no duplicate attrset ID

nobu	2014-06-01 06:55:53 +0900 (Sun, 01 Jun 2014)

  New Revision: 46289

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

  Log:
    parse.y: no duplicate attrset ID
    
    * parse.y (intern_str): dynamic attrset ID is registered by
      `rb_id_attrset()` already, so no further registration is needed.
      [ruby-core:62861]

  Modified files:
    trunk/ChangeLog
    trunk/parse.y
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 46288)
+++ ChangeLog	(revision 46289)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sun Jun  1 06:55:26 2014  Nobuyoshi Nakada  <nobu@r...>
+
+	* parse.y (intern_str): dynamic attrset ID is registered by
+	  `rb_id_attrset()` already, so no further registration is needed.
+	  [ruby-core:62861]
+
 Sun Jun  1 04:52:47 2014  Zachary Scott  <e@z...>
 
 	* lib/English.rb: [DOC] $LOADED_FEATURES moved to load.c [Fixes GH-620]
Index: parse.y
===================================================================
--- parse.y	(revision 46288)
+++ parse.y	(revision 46289)
@@ -10657,7 +10657,9 @@ next_id(VALUE str) https://github.com/ruby/ruby/blob/trunk/parse.y#L10657
 static ID
 intern_str(VALUE str)
 {
-    return register_static_symid_str(next_id(str), str);
+    ID id = next_id(str);
+    if (ID_DYNAMIC_SYM_P(id) && is_attrset_id(id)) return id;
+    return register_static_symid_str(id, str);
 }
 
 ID

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

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