From 8efc41329d0e90b22a33d444b801d0bf7184fc84 Mon Sep 17 00:00:00 2001 From: glass Date: Sat, 30 Sep 2017 13:14:09 +0000 Subject: hash.c: use rb_hash_new_with_size() git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60078 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- array.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'array.c') diff --git a/array.c b/array.c index a59cb6c3e9..c5d7274272 100644 --- a/array.c +++ b/array.c @@ -2180,7 +2180,7 @@ static VALUE rb_ary_to_h(VALUE ary) { long i; - VALUE hash = rb_hash_new(); + VALUE hash = rb_hash_new_with_size(RARRAY_LEN(ary)); for (i=0; i