aboutsummaryrefslogtreecommitdiffstats
path: root/class.c
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-06 19:45:02 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-06 19:45:02 +0000
commitbbf740aea21ee3f5ea8bee2081eea1067e7e76bc (patch)
tree48a6bf93b3f0e36d6d1eb529ddbfec025d36fc79 /class.c
parentabdf432a68aa66359c7fb64334e6f902bdc8821e (diff)
downloadruby-bbf740aea21ee3f5ea8bee2081eea1067e7e76bc.tar.gz
string.c: ensure String#freeze resizes internal buffer
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 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'class.c')
0 files changed, 0 insertions, 0 deletions