summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-06-02 06:51:41 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-06-02 06:51:41 +0000
commit7af941da15ab3663281f229740b68c3d30813eea (patch)
tree27c431f6ecaab44b916ad2a22ef3d04e02ba3721 /eval.c
parentbe29ae6b05bcd4b2ad06cdb5535c598acff66afc (diff)
* eval.c (rb_using_refinement): add write-barriers for
cref->nd_refinements. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/eval.c b/eval.c
index a7c5322..5a6c997 100644
--- a/eval.c
+++ b/eval.c
@@ -1132,11 +1132,11 @@ rb_using_refinement(NODE *cref, VALUE klass, VALUE module)
Check_Type(klass, T_CLASS);
Check_Type(module, T_MODULE);
if (NIL_P(cref->nd_refinements)) {
- cref->nd_refinements = hidden_identity_hash_new();
+ RB_OBJ_WRITE(cref, &cref->nd_refinements, hidden_identity_hash_new());
}
else {
if (cref->flags & NODE_FL_CREF_OMOD_SHARED) {
- cref->nd_refinements = rb_hash_dup(cref->nd_refinements);
+ RB_OBJ_WRITE(cref, &cref->nd_refinements, rb_hash_dup(cref->nd_refinements));
cref->flags &= ~NODE_FL_CREF_OMOD_SHARED;
}
if (!NIL_P(c = rb_hash_lookup(cref->nd_refinements, klass))) {