summaryrefslogtreecommitdiff
path: root/hash.c
diff options
context:
space:
mode:
authorglass <glass@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-11 15:09:56 +0000
committerglass <glass@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-11 15:09:56 +0000
commit76a400ff712d57dab9e9d46a2278c43fa8d34f0d (patch)
treea41140198e7f8133cbf0e333f2d57862bd76f723 /hash.c
parent9ae1b8f96b729aa723377368ecbee8c139f26810 (diff)
* 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
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c2
1 files changed, 1 insertions, 1 deletions
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;