summaryrefslogtreecommitdiff
path: root/re.c
diff options
context:
space:
mode:
authormarcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-09-29 16:39:34 +0000
committermarcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-09-29 16:39:34 +0000
commitc8f61224b2b8a8f59262f0e36160b08284d98385 (patch)
treecd39cd47d66fc8fa3cdc40546e2b7119dbb3c9e8 /re.c
parent8cdc1fca44820b3152286130bf6db930e3758b8b (diff)
* 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/branches/ruby_1_8@25166 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 b9133f7798..ed03980685 100644
--- a/re.c
+++ b/re.c
@@ -2325,6 +2325,9 @@ match_setter(val)
* 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>