summaryrefslogtreecommitdiff
path: root/array.c
diff options
context:
space:
mode:
authorglass <glass@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-10-30 03:11:41 +0000
committerglass <glass@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-10-30 03:11:41 +0000
commitadcab6c1bb711ba5f5b53073bdcb571ce28d26a2 (patch)
treec470777e1ff6a5fbd7618366407fb5b712b81192 /array.c
parent06c6dcee25d983d5a5e0f8e576cd04978ed558e6 (diff)
* array.c (rb_ary_uniq_bang): use rb_ary_modify_check() instead of
rb_ary_modify() because the array will be unshared soon. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'array.c')
-rw-r--r--array.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/array.c b/array.c
index 5e122a2..c7428c5 100644
--- a/array.c
+++ b/array.c
@@ -4111,7 +4111,7 @@ rb_ary_uniq_bang(VALUE ary)
if (RARRAY_LEN(ary) == hash_size) {
return Qnil;
}
- rb_ary_modify(ary);
+ rb_ary_modify_check(ary);
ARY_SET_LEN(ary, 0);
if (ARY_SHARED_P(ary) && !ARY_EMBED_P(ary)) {
rb_ary_unshare(ary);
@@ -4126,7 +4126,7 @@ rb_ary_uniq_bang(VALUE ary)
if (RARRAY_LEN(ary) == hash_size) {
return Qnil;
}
- rb_ary_modify(ary);
+ rb_ary_modify_check(ary);
ARY_SET_LEN(ary, 0);
if (ARY_SHARED_P(ary) && !ARY_EMBED_P(ary)) {
rb_ary_unshare(ary);