Issue #11330 has been reported by Eric Wong.

----------------------------------------
Feature #11330: [PATCH] string.c: ensure String#freeze resizes internal buffer
https://bugs.ruby-lang.org/issues/11330

* Author: Eric Wong
* Status: Open
* Priority: Normal
* Assignee: Eric Wong
----------------------------------------
rb_str_freeze may resize oversized buffers to save memory, so favor
it over rb_obj_freeze.  This is useful because IO methods do not
prematurely shrink buffers, as they are likely to be overwritten
with full data.

* string.c (Init_String): use rb_str_freeze for String#freeze

Will commit soonish


---Files--------------------------------
0001-string.c-ensure-String-freeze-resizes-internal-buffe.patch (2.21 KB)


-- 
https://bugs.ruby-lang.org/