summaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
authorLourens Naudé <lourens@bearmetal.eu>2019-10-21 23:49:54 +0100
committer卜部昌平 <shyouhei@ruby-lang.org>2019-10-29 11:31:50 +0900
commit0095362918375fb694345133e33199b01911e594 (patch)
tree23ba855a3842f3ac5d507db27e657e7022f7f8dd /vm.c
parent0e68913f81eb35ae615592986a23b0f8f22501c6 (diff)
Right size the vm_default_params hash
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/2592
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vm.c b/vm.c
index e104688d71..9f024895c5 100644
--- a/vm.c
+++ b/vm.c
@@ -2373,7 +2373,7 @@ static VALUE
vm_default_params(void)
{
rb_vm_t *vm = GET_VM();
- VALUE result = rb_hash_new();
+ VALUE result = rb_hash_new_with_size(4);
#define SET(name) rb_hash_aset(result, ID2SYM(rb_intern(#name)), SIZET2NUM(vm->default_params.name));
SET(thread_vm_stack_size);
SET(thread_machine_stack_size);