title: Ruby regex: ^ matches start of line even without m modifier?
body: <p>Ruby 1.8.7. I'm using a regex with a ^ to match a pattern at the start of the string. The problem is that if the pattern is found at the start of <em>any line</em> in the string it still matches. This is the behaviour I would expect if I were using the 'm' modifier but I'm not:</p>
  
  <pre><code>$ irb
  irb(main):001:0&gt; str = "hello\ngoodbye"
  =&gt; "hello\ngoodbye"
  irb(main):002:0&gt; puts str
  hello
  goodbye
  =&gt; nil
  irb(main):004:0&gt; str =~ /^goodbye/
  =&gt; 6
  </code></pre>
  
  <p>What am I doing wrong here?</p>