From 76a400ff712d57dab9e9d46a2278c43fa8d34f0d Mon Sep 17 00:00:00 2001 From: glass Date: Thu, 11 Jul 2013 15:09:56 +0000 Subject: * hash.c (rb_hash_values): set array capa to RHASH_SIZE(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41926 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hash.c') diff --git a/hash.c b/hash.c index 448476a2c1..8321a9f4ad 100644 --- a/hash.c +++ b/hash.c @@ -1681,7 +1681,7 @@ rb_hash_values(VALUE hash) { VALUE ary; - ary = rb_ary_new(); + ary = rb_ary_new_capa(RHASH_SIZE(hash)); rb_hash_foreach(hash, values_i, ary); return ary; -- cgit v1.2.3