summaryrefslogtreecommitdiff
path: root/array.c
diff options
context:
space:
mode:
Diffstat (limited to 'array.c')
-rw-r--r--array.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/array.c b/array.c
index b23c311..b808c64 100644
--- a/array.c
+++ b/array.c
@@ -2261,13 +2261,8 @@ rb_ary_fill(argc, argv, ary)
REALLOC_N(RARRAY(ary)->ptr, VALUE, end);
RARRAY(ary)->aux.capa = end;
}
- RARRAY(ary)->len = end;
- }
- if (beg > RARRAY(ary)->len) {
rb_mem_clear(RARRAY(ary)->ptr + RARRAY(ary)->len, end - RARRAY(ary)->len);
- }
- else {
- rb_mem_clear(RARRAY(ary)->ptr + beg, end - beg);
+ RARRAY(ary)->len = end;
}
if (block_p) {