diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-05-22 08:19:04 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-05-22 08:19:04 +0000 |
commit | f73c84542c5a7462c12118ec56b459660636f903 (patch) | |
tree | 67cb88645eb3da6b3e4edfccdbf91bcc4831ee4a /array.c | |
parent | da5e82f5a353745c17d726a86379c17797e7be73 (diff) |
* array.c (rb_ary_compact_bang): fix reallocation size.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'array.c')
-rw-r--r-- | array.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2715,7 +2715,7 @@ rb_ary_compact_bang(VALUE ary) return Qnil; } if (n * 2 < ARY_CAPA(ary) && ARY_DEFAULT_SIZE * 2 < ARY_CAPA(ary)) { - RESIZE_CAPA(ary, ARY_DEFAULT_SIZE * 2); + RESIZE_CAPA(ary, n * 2); } RARRAY(ary)->len = n; |