diff options
Diffstat (limited to 'hash.c')
-rw-r--r-- | hash.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -692,6 +692,9 @@ rb_hash_s_create(int argc, VALUE *argv, VALUE klass) } hash = hash_alloc(klass); + if (argc > 0) { + RHASH(hash)->ntbl = st_init_table_with_size(&objhash, argc / 2); + } for (i=0; i<argc; i+=2) { rb_hash_aset(hash, argv[i], argv[i + 1]); } |