title: gsub caching groups?
body: <p>If I run this code:</p>
  
  <pre><code>"Retailer Staff $5.60".gsub(/.*\$(\d+(\.\d+)?).*/, $1)
  # =&gt; 5.60
  </code></pre>
  
  <p>and then I change the value to:</p>
  
  <pre><code>"Retailer Staff $5".gsub(/.*\$(\d+(\.\d+)?).*/, $1)
  # =&gt; 5.60
  </code></pre>
  
  <p>the answer stays at <code>5.60</code>. Then, if I run the same line again, I get:</p>
  
  <pre><code>"Retailer Staff $5".gsub(/.*\$(\d+(\.\d+)?).*/, $1)
  # =&gt; 5
  </code></pre>
  
  <p>What's happening? Why would the same code run twice give two answers? Is <code>gsub</code> caching something?</p>