summaryrefslogtreecommitdiff
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-14 18:43:10 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-14 18:43:10 +0000
commitbc69a7df4c6738d44b6fa75742458c6985750ddb (patch)
tree75832dd7790f440e3774076ce72317dee6b55c9d /vm_insnhelper.c
parent7ebca22266ccd459e3848046293ee7b04fc0675b (diff)
merge revision(s) 49898: [Backport #10951]
* vm_insnhelper.c (lep_svar_set): add WBs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@50899 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r--vm_insnhelper.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index 8b2f8e78c4..b40ebe1814 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -186,16 +186,16 @@ lep_svar_set(rb_thread_t *th, VALUE *lep, rb_num_t key, VALUE val)
switch (key) {
case 0:
- svar->u1.value = val;
+ RB_OBJ_WRITE(svar, &svar->u1.value, val);
return;
case 1:
- svar->u2.value = val;
+ RB_OBJ_WRITE(svar, &svar->u2.value, val);
return;
default: {
VALUE ary = svar->u3.value;
if (NIL_P(ary)) {
- svar->u3.value = ary = rb_ary_new();
+ RB_OBJ_WRITE(svar, &svar->u3.value, ary = rb_ary_new());
}
rb_ary_store(ary, key - DEFAULT_SPECIAL_VAR_COUNT, val);
}