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

ruby-changes:37794

From: ko1 <ko1@a...>
Date: Fri, 6 Mar 2015 22:51:40 +0900 (JST)
Subject: [ruby-changes:37794] ko1:r49875 (trunk): * class.c (rb_prepend_module): need a WB for klass -> origin.

ko1	2015-03-06 22:51:27 +0900 (Fri, 06 Mar 2015)

  New Revision: 49875

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

  Log:
    * class.c (rb_prepend_module): need a WB for klass -> origin.

  Modified files:
    trunk/ChangeLog
    trunk/class.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 49874)
+++ ChangeLog	(revision 49875)
@@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Fri Mar  6 22:50:36 2015  Koichi Sasada  <ko1@a...>
+
+	* class.c (rb_prepend_module): need a WB for klass -> origin.
+
 Fri Mar  6 20:18:38 2015  Koichi Sasada  <ko1@a...>
 
 	* fix namespace issue on singleton class expressions. [Bug #10943]
Index: class.c
===================================================================
--- class.c	(revision 49874)
+++ class.c	(revision 49875)
@@ -939,7 +939,7 @@ rb_prepend_module(VALUE klass, VALUE mod https://github.com/ruby/ruby/blob/trunk/class.c#L939
 	OBJ_WB_UNPROTECT(origin); /* TODO: conservative shading. Need more survey. */
 	RCLASS_SET_SUPER(origin, RCLASS_SUPER(klass));
 	RCLASS_SET_SUPER(klass, origin);
-	RCLASS_ORIGIN(klass) = origin;
+	RB_OBJ_WRITE(klass, &RCLASS_ORIGIN(klass), origin);
 	RCLASS_M_TBL(origin) = RCLASS_M_TBL(klass);
 	RCLASS_M_TBL_INIT(klass);
 	st_foreach(RCLASS_M_TBL(origin), move_refined_method,

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

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