From: SASADA Koichi Date: 2011-06-11T01:11:10+09:00 Subject: [ruby-core:36945] Re: rb_str_modify() now required before rb_str_resize()? Hi, (2011/05/01 11:48), Eric Wong wrote: > In 1.9.2 and earlier, rb_str_resize() always calls rb_str_modify() > internally. Some C extensions I maintain relied on this behavior. > > In trunk, rb_str_resize() no longer calls rb_str_modify() nor unshares > the string for copy-on-write if the string is already the desired size. > > I believe this is inconsistent since a C extension would normally expect > to write to a string (and thus need to trigger copy-on-write) if it's > calling rb_str_resize() on it. It seems that there are no discussion about this topic. Who change it? In my opinion, I can't imagine that rb_str_resize() always call rb_str_modify(). -- // SASADA Koichi at atdot dot net