summaryrefslogtreecommitdiff
path: root/array.c
diff options
context:
space:
mode:
authorglass <glass@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-11-06 12:20:39 +0000
committerglass <glass@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-11-06 12:20:39 +0000
commit564a14e497435730b0bad966047676a54090ffe1 (patch)
tree4ae21b6b9d7b68b9d2bad8a0d002e3f6eaedce81 /array.c
parent27f2c267fd667045ed7288d91076508618cfe0a8 (diff)
* array.c (rb_ary_shift_m): use RARRAY_PTR_USE() without WB because
there are not new relations. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43557 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'array.c')
-rw-r--r--array.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/array.c b/array.c
index 2a85772..f1919fd 100644
--- a/array.c
+++ b/array.c
@@ -1070,7 +1070,9 @@ rb_ary_shift_m(int argc, VALUE *argv, VALUE ary)
ARY_INCREASE_PTR(ary, n);
}
else {
- MEMMOVE(RARRAY_PTR(ary), RARRAY_PTR(ary)+n, VALUE, RARRAY_LEN(ary)-n);
+ RARRAY_PTR_USE(ary, ptr, {
+ MEMMOVE(ptr, ptr + n, VALUE, RARRAY_LEN(ary)-n);
+ }); /* WB: no new reference */
}
ARY_INCREASE_LEN(ary, -n);