Introduce support for resize in rb_ary_freeze and prefer internal use of rb_ary_freeze and rb_str_freeze for String and Array types by methodmissing · Pull Request #2640 · ruby/ruby

Why? While working on #2037 (comment) I also looked at the rb_ary_freeze helper to determine if the same optimization of shrinking capacity can be applied there as well. Further investigation revea...