summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2021-12-03 15:38:16 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2021-12-03 15:38:16 +0900
commitd3ebe4894b629d0333f746bb6bec3623dc89b69e (patch)
treef1b0fc2b35576b14bfe93dfd1bccb9d974fc1fc5 /src
parenta20c2a08abf48099f38d16f103312aad12c6999b (diff)
downloadmruby-d3ebe4894b629d0333f746bb6bec3623dc89b69e.tar.gz
mruby-d3ebe4894b629d0333f746bb6bec3623dc89b69e.zip
variable.c: first iv allocation size should be 4 instead of 1.
Diffstat (limited to 'src')
-rw-r--r--src/variable.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/variable.c b/src/variable.c
index 1130b7aaf..bef0f0823 100644
--- a/src/variable.c
+++ b/src/variable.c
@@ -39,7 +39,7 @@ static void
iv_rehash(mrb_state *mrb, iv_tbl *t)
{
size_t old_alloc = t->alloc;
- size_t new_alloc = old_alloc+1;
+ size_t new_alloc = old_alloc+4;
mrb_value *old_ptr = t->ptr;
khash_power2(new_alloc);