ruby-changes:13395
From: marcandre <ko1@a...>
Date: Wed, 30 Sep 2009 01:39:55 +0900 (JST)
Subject: [ruby-changes:13395] Ruby:r25165 (trunk): * re.c (last_match): Added note to the doc that last_match is local to current scope
marcandre 2009-09-30 01:38:00 +0900 (Wed, 30 Sep 2009) New Revision: 25165 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=25165 Log: * re.c (last_match): Added note to the doc that last_match is local to current scope [ruby-core:25833] Modified files: trunk/re.c Index: re.c =================================================================== --- re.c (revision 25164) +++ re.c (revision 25165) @@ -3392,6 +3392,9 @@ * <code>MatchData</code> object. * <em>n</em> can be a string or symbol to reference a named capture. * + * Note that the <code>last_match</code> is local to the scope + * of the method that did the pattern match. + * * /c(.)t/ =~ 'cat' #=> 0 * Regexp.last_match #=> #<MatchData "cat" 1:"a"> * Regexp.last_match(0) #=> "cat" -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/