* 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
This commit is contained in:
parent
be29ae6b05
commit
7af941da15
@ -1,3 +1,8 @@
|
||||
Mon Jun 2 15:50:24 2014 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* eval.c (rb_using_refinement): add write-barriers for
|
||||
cref->nd_refinements.
|
||||
|
||||
Mon Jun 2 12:26:08 2014 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
|
||||
|
||||
* CONTRIBUTING.md: added contibuting guide for github. [fix GH-625]
|
||||
|
4
eval.c
4
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))) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user