summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2020-07-22 14:23:10 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2020-07-22 15:01:54 +0900
commit097f525817d0825f12780adfc8542bb7f3db1302 (patch)
tree6dd33f3499d0cc177262e9928d070a3f8a5a5a4c /src
parent5533c2983373a9fca5a97074ebe9258841ce4d00 (diff)
downloadmruby-097f525817d0825f12780adfc8542bb7f3db1302.tar.gz
mruby-097f525817d0825f12780adfc8542bb7f3db1302.zip
Avoid using `mrb_ary_modify` from the internal function.
`mrb_ary_modify` calls `mrb_write_barrier`, so can cause the same problem of the past `push`. It is provided for use-level API.
Diffstat (limited to 'src')
-rw-r--r--src/array.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/array.c b/src/array.c
index eb94fc6c7..ef8588d31 100644
--- a/src/array.c
+++ b/src/array.c
@@ -943,7 +943,7 @@ mrb_ary_aset(mrb_state *mrb, mrb_value self)
mrb_value v1, v2, v3;
mrb_int i, len;
- mrb_ary_modify(mrb, mrb_ary_ptr(self));
+ ary_modify(mrb, mrb_ary_ptr(self));
if (mrb_get_argc(mrb) == 2) {
mrb_value *vs = mrb_get_argv(mrb);
v1 = vs[0]; v2 = vs[1];