--0016e6de1524e527bc046bd5e12d
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

Here's even more simplified example how to reproduce this bug. (First one
didnt work on linux).

s1  tring.new()
10.times { s1 << "abc" }
p s1
s2  1.dup
p s2
s1.replace("xxx");
p s1
p s2

Run with valgrind --free-fill./miniruby test.rb

--0016e6de1524e527bc046bd5e12d
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<div>Here&#39;s even more simplified example how to reproduce this bug. (First one didnt work on linux).<br></div><div></div><div>s1  tring.new()<br>10.times { s1 &lt;&lt; &quot;abc&quot; }<br>p s1<br>s2  1.dup<br>p s2<br>
s1.replace(&quot;xxx&quot;);<br>p s1<br>p s2<br><br></div><div>Run with valgrind --free-fillĄ§ ./miniruby test.rb</div>

--0016e6de1524e527bc046bd5e12d--