title: Ruby switch statement with strings
body: <p>For some reason this switch statement isn't behaving as I expected:</p>
  
  <pre><code>aString = "DATE MODIFIED"
  
  case aString
      when "DATE MODIFIED"
      =&gt; Never gets here
  end
  </code></pre>
  
  <p>But this works</p>
  
  <pre><code>aString = "DATE"
  case aString
      when "DATE"
      =&gt; Does get here
  end
  </code></pre>
  
  <p>Can anyone explain why, and provide a way to use strings with spaces inside a switch?</p>
  
  <p>Thanks</p>