From b59109a84493f08ab1c8e5e8637597b5ac93270b Mon Sep 17 00:00:00 2001 From: marcandre Date: Tue, 29 Sep 2009 16:38:00 +0000 Subject: * re.c (last_match): Added note to the doc that last_match is local to current scope [ruby-core:25833] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25165 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- re.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 're.c') diff --git a/re.c b/re.c index ec20c44a3d..74eacf1ad8 100644 --- a/re.c +++ b/re.c @@ -3392,6 +3392,9 @@ match_setter(VALUE val) * MatchData object. * n can be a string or symbol to reference a named capture. * + * Note that the last_match is local to the scope + * of the method that did the pattern match. + * * /c(.)t/ =~ 'cat' #=> 0 * Regexp.last_match #=> # * Regexp.last_match(0) #=> "cat" -- cgit v1.2.3