ruby-changes:29872
From: glass <ko1@a...>
Date: Fri, 12 Jul 2013 00:06:33 +0900 (JST)
Subject: [ruby-changes:29872] glass:r41924 (trunk): * hash.c (rb_hash_keys): set array capa to RHASH_SIZE().
glass 2013-07-12 00:06:18 +0900 (Fri, 12 Jul 2013) New Revision: 41924 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=41924 Log: * hash.c (rb_hash_keys): set array capa to RHASH_SIZE(). Modified files: trunk/ChangeLog trunk/hash.c Index: ChangeLog =================================================================== --- ChangeLog (revision 41923) +++ ChangeLog (revision 41924) @@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Thu Jul 11 23:54:45 2013 Masaki Matsushita <glass.saga@g...> + + * hash.c (rb_hash_keys): set array capa to RHASH_SIZE(). + Thu Jul 11 21:30:17 2013 Nobuyoshi Nakada <nobu@r...> * win32/win32.c (rb_w32_pow): undef pow to get rid of infinite Index: hash.c =================================================================== --- hash.c (revision 41923) +++ hash.c (revision 41924) @@ -1651,7 +1651,7 @@ rb_hash_keys(VALUE hash) https://github.com/ruby/ruby/blob/trunk/hash.c#L1651 { VALUE ary; - ary = rb_ary_new(); + ary = rb_ary_new_capa(RHASH_SIZE(hash)); rb_hash_foreach(hash, keys_i, ary); return ary; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/