title: Can't modify frozen String error using gsub and hash
body: <p>I'm trying to create a ruby rspec with capybara and I'm getting this error when attempting to remove part of a string from a hash: can't modify frozen String</p>
  
  <pre><code>scenario "check doc" do
  docs = {
    'A doc' =&gt; 'a.txt',
    'B doc' =&gt; 'b.txt',
    'C doc' =&gt; 'c.txt'
  }
  random_doc = docs.keys.sample
  page.should have_css('.class', :text =&gt; 'Document ' + random_doc.gsub!(' doc') + ' was selected')
  </code></pre>
  
  <p>Any help would be appreciated!</p>