summaryrefslogtreecommitdiff
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-17 02:41:18 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-17 02:41:18 +0000
commit9af0f53f6d2ba6f9a40b23b6f9816a69814d1f96 (patch)
tree4abcc6de2ee09171767deb318b2ba5dbebfe7e57 /vm_insnhelper.c
parentf2016423a6e52b0b779265151b27361aeefedd54 (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_1@50930 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 20dc63f1e0..7a081d2b74 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -200,16 +200,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);
}