diff options
author | Lourens Naudé <lourens@bearmetal.eu> | 2019-10-21 23:31:46 +0100 |
---|---|---|
committer | 卜部昌平 <shyouhei@ruby-lang.org> | 2019-10-29 11:31:34 +0900 |
commit | 0e68913f81eb35ae615592986a23b0f8f22501c6 (patch) | |
tree | 531c821e7e80c892498188fad7e0609d56f20deb /enumerator.c | |
parent | 4480d68931f3c7b25e194b30dea304b294744c92 (diff) |
Right size the Enumerator internal lazy_use_super_method hash
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/2591
Diffstat (limited to 'enumerator.c')
-rw-r--r-- | enumerator.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/enumerator.c b/enumerator.c index 06e2a9e6a7..5f21455ddd 100644 --- a/enumerator.c +++ b/enumerator.c @@ -4016,7 +4016,7 @@ InitVM_Enumerator(void) rb_define_method(rb_cLazy, "uniq", lazy_uniq, 0); rb_define_method(rb_cLazy, "with_index", lazy_with_index, -1); - lazy_use_super_method = rb_hash_new(); + lazy_use_super_method = rb_hash_new_with_size(18); rb_hash_aset(lazy_use_super_method, ID2SYM(rb_intern("map")), ID2SYM(rb_intern("_enumerable_map"))); rb_hash_aset(lazy_use_super_method, ID2SYM(rb_intern("collect")), ID2SYM(rb_intern("_enumerable_collect"))); rb_hash_aset(lazy_use_super_method, ID2SYM(rb_intern("flat_map")), ID2SYM(rb_intern("_enumerable_flat_map"))); |