title: ruby rspec and strings comparison
body: <p>I'm not a ruby expert and may be this will seem a silly question...but I'm too courious about an oddity (I think) I've found in RSpec matcher called match.</p>
  
  <p>You know <code>match</code> takes in input a string or a regex. Example:</p>
  
  <pre><code>"test".should match "test" #=&gt; will pass
  "test".should match /test/ #=&gt; will pass
  </code></pre>
  
  <p>The strange begins when you insert special regex characters in the input string:</p>
  
  <pre><code>"*test*".should match "*test*" #=&gt; will fail throwing a regex exception
  </code></pre>
  
  <p>This means (I thought) that input strings are interpreted as regex, then I should escape special regex characters to make it works:</p>
  
  <pre><code>"*test*".should match "\*test\*" #=&gt; will fail with same exception
  "*test*".should match /\*test\*/ #=&gt; will pass
  </code></pre>
  
  <p>From this basic test, I understand that <code>match</code> treats input strings as regular expressions but it does not allow you to escape special regex characters.</p>
  
  <p>Am I true? Is not this a singular behavior? I mean, it's a string or a regex!</p>
  
  <hr>
  
  <p>EDIT AFTER ANSWER:</p>
  
  <p>Following DigitalRoss (right) answer the following tests passed:</p>
  
  <pre><code>"*test*".should match "\\*test\\*" #=&gt; pass
  "*test*".should match '\*test\*' #=&gt; pass
  "*test*".should match /\*test\*/ #=&gt; pass
  </code></pre>