title: Are strings in Ruby mutable?
body: <p>Consider the following code:</p>
  
  <pre><code>$ irb
  &gt; s = "asd"
  &gt; s.object_id   # prints 2171223360
  &gt; s[0] = ?z     # s is now "zsd"
  &gt; s.object_id   # prints 2171223360 (same as before)
  &gt; s += "hello"  # s is now "zsdhello"
  &gt; s.object_id   # prints 2171224560 (now it's different)
  </code></pre>
  
  <p>Seems like individual characters can be changed w/o creating a new string. However appending to the string apparently creates a new string.</p>
  
  <p><strong>Are strings in Ruby mutable?</strong></p>