summaryrefslogtreecommitdiff
path: root/class.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-08-12 06:19:15 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-08-12 06:19:15 +0000
commit9af743fe0e8c7aa7a25a6805a64d499aab3032af (patch)
tree0269c09d852781b6f518a912ca9d82c4e9605411 /class.c
parent7f0a26e2718246c0c171df648e020fc1df873d0b (diff)
* class.c (rb_prepend_module): make T_ICLASS object shady because
this T_ICLASS object seems to share method table with other class objects. It was causes WB miss. TODO: need to know the data structure. * test/ruby/test_module.rb: add a test for WB miss. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'class.c')
-rw-r--r--class.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/class.c b/class.c
index 04e9dcb..f87d2bd 100644
--- a/class.c
+++ b/class.c
@@ -826,6 +826,7 @@ rb_prepend_module(VALUE klass, VALUE module)
origin = RCLASS_ORIGIN(klass);
if (origin == klass) {
origin = class_alloc(T_ICLASS, klass);
+ OBJ_WB_UNPROTECT(origin); /* TODO: conservertive shading. Need more survery. */
RCLASS_SET_SUPER(origin, RCLASS_SUPER(klass));
RCLASS_SET_SUPER(klass, origin);
RCLASS_ORIGIN(klass) = origin;