From 806e7947fec775ce27aa783ee00dbd8f52685db8 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sat, 2 Oct 2021 08:40:37 +0900 Subject: Add rb_ident_hash_new_with_size --- hash.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'hash.c') diff --git a/hash.c b/hash.c index 42f2f993fb..9c3164c96a 100644 --- a/hash.c +++ b/hash.c @@ -4425,6 +4425,14 @@ rb_ident_hash_new(void) return hash; } +VALUE +rb_ident_hash_new_with_size(st_index_t size) +{ + VALUE hash = rb_hash_new(); + RHASH_ST_TABLE_SET(hash, st_init_table_with_size(&identhash, size)); + return hash; +} + st_table * rb_init_identtable(void) { -- cgit v1.2.1