summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--array.c3
2 files changed, 6 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 9e0f211..6049cd0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sat Jul 20 15:22:38 2013 Koichi Sasada <ko1@atdot.net>
+
+ * array.c (rb_ary_resize): use simple memcpy because there are no new
+ references.
+
Sat Jul 20 15:02:51 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
* safe.c (ruby_safe_level_4_warning): define for old extension
diff --git a/array.c b/array.c
index 30786f8..eeeb989 100644
--- a/array.c
+++ b/array.c
@@ -623,7 +623,6 @@ ary_make_shared(VALUE ary)
}
}
-
static VALUE
ary_make_substitution(VALUE ary)
{
@@ -1642,7 +1641,7 @@ rb_ary_resize(VALUE ary, long len)
VALUE tmp[RARRAY_EMBED_LEN_MAX];
MEMCPY(tmp, ARY_HEAP_PTR(ary), VALUE, len);
ary_discard(ary);
- ary_memcpy(ary, 0, len, tmp);
+ MEMCPY((VALUE *)ARY_EMBED_PTR(ary), tmp, VALUE, len); /* WB: no new reference */
ARY_SET_EMBED_LEN(ary, len);
}
else {