summaryrefslogtreecommitdiff
path: root/hash.c
diff options
context:
space:
mode:
authorglass <glass@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-11 15:06:18 +0000
committerglass <glass@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-11 15:06:18 +0000
commitc459495c776616dd575be770c52239ce10b8d891 (patch)
treee9fc42697a2d51d7d25e66f3f17d9d4d4360ff27 /hash.c
parent3c9e6f1e624031b4736941804ad1f25f685b3999 (diff)
* hash.c (rb_hash_keys): set array capa to RHASH_SIZE().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41924 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 903cca24a0..448476a2c1 100644
--- a/hash.c
+++ b/hash.c
@@ -1651,7 +1651,7 @@ rb_hash_keys(VALUE hash)
{
VALUE ary;
- ary = rb_ary_new();
+ ary = rb_ary_new_capa(RHASH_SIZE(hash));
rb_hash_foreach(hash, keys_i, ary);
return ary;