diff options
author | marcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-09-29 16:39:34 +0000 |
---|---|---|
committer | marcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-09-29 16:39:34 +0000 |
commit | c8f61224b2b8a8f59262f0e36160b08284d98385 (patch) | |
tree | cd39cd47d66fc8fa3cdc40546e2b7119dbb3c9e8 /re.c | |
parent | 8cdc1fca44820b3152286130bf6db930e3758b8b (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.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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> |