summaryrefslogtreecommitdiff
path: root/hash.c
diff options
context:
space:
mode:
authorglass <glass@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-12-01 05:39:38 +0000
committerglass <glass@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-12-01 05:39:38 +0000
commit8efbe962317bfa81dd850695a32f01613e23c79a (patch)
treea6d5f32d78fb6cf9e6346c22b881d0723a6a2c8f /hash.c
parentbfbe1b9b31aaf678c4cfe2be09e78acb42629c7f (diff)
* hash.c (rb_hash_to_a): specify array capa.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43943 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 d312325..e1d6828 100644
--- a/hash.c
+++ b/hash.c
@@ -1606,7 +1606,7 @@ rb_hash_to_a(VALUE hash)
{
VALUE ary;
- ary = rb_ary_new();
+ ary = rb_ary_new_capa(RHASH_SIZE(hash));
rb_hash_foreach(hash, to_a_i, ary);
OBJ_INFECT(ary, hash);