summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--array.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/array.c b/array.c
index e886c2fa55..6e6778d68d 100644
--- a/array.c
+++ b/array.c
@@ -188,6 +188,8 @@ rb_ary_new4(n, elts)
if (n > 0 && elts) {
MEMCPY(RARRAY(ary)->ptr, elts, VALUE, n);
}
+
+ /* This assignment to len will be moved to the above "if" block in Ruby 1.9 */
RARRAY(ary)->len = n;
return ary;