Project

General

Profile

Bug #7062 ยป rdoc_for_string_match.patch

stomar (Marcus Stollsteimer), 09/24/2012 04:46 AM

View differences:

string.c (Arbeitskopie)
* <i>obj.=~</i>, passing <i>str</i> as an argument. The default
* <code>=~</code> in <code>Object</code> returns <code>nil</code>.
*
* Note: <code>str =~ regexp</code> is not the same as
* <code>regexp =~ str</code>. Strings captured from named capture groups
* are not assigned to local variables in the first case.
*
* "cat o' 9 tails" =~ /\d/ #=> 7
* "cat o' 9 tails" =~ 9 #=> nil
*/
    (1-1/1)