title: How can I clear a `StringIO` instance?
body: <p>How can I clear a <code>StringIO</code> instance? After I write to and read from a string io, I want to clear it.</p>
  
  <pre><code>require "stringio"
  io = StringIO.new
  io.write("foo")
  io.string #=&gt; "foo"
  # ... After doing something ...
  io.string #=&gt; Expecting ""
  </code></pre>
  
  <p>I tried <code>flush</code> and <code>rewind</code>, but I still get the same content.</p>