title: What do I put in the first argument of `gsub` when used with a hash?
body: <p>You can use hashes in the second argument of <code>gsub</code>. All of the examples I've seen usually have something that I don't understand in the first argument, for <a href="http://batsov.com/articles/2013/10/03/using-rubys-gsub-with-a-hash/" rel="nofollow">example</a>:</p>
  
  <pre><code>def doctorize(string)
    string.gsub(/M(iste)?r/, 'Mister' =&gt; 'Doctor', 'Mr' =&gt; 'Dr')
  end
  
  doctorize('Mister Freeze') # =&gt; 'Doctor Freeze'
  doctorize('Mr Smith')   # =&gt; 'Dr Smith'
  </code></pre>
  
  <p>If anyone can explain this, I appreciate it. Can anyone help?</p>