diff options
author | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-07-06 19:45:02 +0000 |
---|---|---|
committer | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-07-06 19:45:02 +0000 |
commit | bbf7495fe223c7ab8235bf372c1164ab4e70633b (patch) | |
tree | 48a6bf93b3f0e36d6d1eb529ddbfec025d36fc79 /ChangeLog | |
parent | 57f2c60727bb856d1ace83d03045b03d11fb8768 (diff) | |
download | ruby-bbf7495fe223c7ab8235bf372c1164ab4e70633b.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 'ChangeLog')
-rw-r--r-- | ChangeLog | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -1,3 +1,9 @@ +Tue Jul 7 04:42:25 2015 Eric Wong <e@80x24.org> + + * string.c (Init_String): use rb_str_freeze for String#freeze + to resize internal buffer + [ruby-core:69870] [Feature #11330] + Tue Jul 7 04:12:32 2015 Koichi Sasada <ko1@atdot.net> * vm.c (vm_define_method): remove an unused local variable. |