summaryrefslogtreecommitdiffstats
path: root/re.c
diff options
context:
space:
mode:
authormarcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-09-29 16:38:00 +0000
committermarcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-09-29 16:38:00 +0000
commit2b0989630119c026cdeafe986fca7740bf8bdd6f (patch)
treee1d474dcde4ccf016a5882703212f889b65fa7c3 /re.c
parent58a4e147ef57667e1d63045c60c68e75b774765e (diff)
downloadruby-2b0989630119c026cdeafe986fca7740bf8bdd6f.tar.gz
ruby-2b0989630119c026cdeafe986fca7740bf8bdd6f.tar.xz
ruby-2b0989630119c026cdeafe986fca7740bf8bdd6f.zip
* re.c (last_match): Added note to the doc that last_match is local to current scope [ruby-core:25833]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25165 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 're.c')
-rw-r--r--re.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/re.c b/re.c
index ec20c44a3..74eacf1ad 100644
--- a/re.c
+++ b/re.c
@@ -3392,6 +3392,9 @@ match_setter(VALUE val)
* <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"