ruby-changes:13396
From: marcandre <ko1@a...>
Date: Wed, 30 Sep 2009 01:40:02 +0900 (JST)
Subject: [ruby-changes:13396] Ruby:r25166 (ruby_1_8): * re.c (last_match): Added note to the doc that last_match is local to current scope
marcandre 2009-09-30 01:39:34 +0900 (Wed, 30 Sep 2009) New Revision: 25166 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=25166 Log: * re.c (last_match): Added note to the doc that last_match is local to current scope [ruby-core:25833] Modified files: branches/ruby_1_8/re.c Index: ruby_1_8/re.c =================================================================== --- ruby_1_8/re.c (revision 25165) +++ ruby_1_8/re.c (revision 25166) @@ -2325,6 +2325,9 @@ * last successful pattern match. Equivalent to reading the global variable * <code>$~</code>. The second form returns the nth field in this * <code>MatchData</code> object. + * + * 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:0x401b3d30> -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/