Project

General

Profile

Actions

Feature #11330

closed

[PATCH] string.c: ensure String#freeze resizes internal buffer

Added by normalperson (Eric Wong) almost 9 years ago. Updated about 6 years ago.

Status:
Closed
Target version:
-
[ruby-core:69870]

Description

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

Actions #1

Updated by normalperson (Eric Wong) about 6 years ago

  • Status changed from Open to Closed
Actions

Also available in: Atom PDF

Like0
Like0