summaryrefslogtreecommitdiff
path: root/hash.c
diff options
context:
space:
mode:
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;