From: Eric Wong Date: 2011-05-01T11:48:50+09:00 Subject: [ruby-core:35962] rb_str_modify() now required before rb_str_resize()? 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. -- Eric Wong