aboutsummaryrefslogtreecommitdiffstats
path: root/marshal.c
diff options
context:
space:
mode:
authorglass <glass@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-01 04:26:25 +0000
committerglass <glass@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-01 04:26:25 +0000
commit7268ff1ac82ee70293478f45204c0446f29c1209 (patch)
tree088d2d6dc717d99df6fb5eb9a65d41a021464f73 /marshal.c
parentbc3081d41759ed4aead52061921ba1461b50a7f6 (diff)
downloadruby-7268ff1ac82ee70293478f45204c0446f29c1209.tar.gz
use rb_hash_new_with_size()
* hash.c: use rb_hash_new_with_size(). * marshal.c: ditto * struct.c: ditto * vm_args.c: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'marshal.c')
-rw-r--r--marshal.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/marshal.c b/marshal.c
index 7e16d0b024..61eb01e721 100644
--- a/marshal.c
+++ b/marshal.c
@@ -1772,7 +1772,7 @@ r_object0(struct load_arg *arg, int *ivp, VALUE extmod)
{
long len = r_long(arg);
- v = rb_hash_new();
+ v = rb_hash_new_with_size(len);
v = r_entry(v, arg);
arg->readable += (len - 1) * 2;
while (len--) {