ruby-changes:5035
From: akr <ko1@a...>
Date: Thu, 22 May 2008 17:19:24 +0900 (JST)
Subject: [ruby-changes:5035] akr - Ruby:r16528 (trunk): * array.c (rb_ary_compact_bang): fix reallocation size.
akr 2008-05-22 17:19:04 +0900 (Thu, 22 May 2008) New Revision: 16528 Modified files: trunk/ChangeLog trunk/array.c Log: * array.c (rb_ary_compact_bang): fix reallocation size. http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/array.c?r1=16528&r2=16527&diff_format=u http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=16528&r2=16527&diff_format=u Index: array.c =================================================================== --- array.c (revision 16527) +++ array.c (revision 16528) @@ -2715,7 +2715,7 @@ 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; Index: ChangeLog =================================================================== --- ChangeLog (revision 16527) +++ ChangeLog (revision 16528) @@ -1,3 +1,7 @@ +Thu May 22 17:18:35 2008 Tanaka Akira <akr@f...> + + * array.c (rb_ary_compact_bang): fix reallocation size. + Thu May 22 15:20:20 2008 NAKAMURA Usaku <usa@r...> * eval_intern.h, vm_core.h, include/ruby/intern.h, include/ruby/ruby.h, -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/