зеркало из https://github.com/github/ruby.git
[DOC] Regexp.last_match returns `$~`, not `$!`
This commit is contained in:
Родитель
ee482f48ee
Коммит
5a570421a5
2
re.c
2
re.c
|
@ -4607,7 +4607,7 @@ match_setter(VALUE val, ID _x, VALUE *_y)
|
||||||
* Regexp.last_match(n) -> string or nil
|
* Regexp.last_match(n) -> string or nil
|
||||||
* Regexp.last_match(name) -> string or nil
|
* Regexp.last_match(name) -> string or nil
|
||||||
*
|
*
|
||||||
* With no argument, returns the value of <tt>$!</tt>,
|
* With no argument, returns the value of <tt>$~</tt>,
|
||||||
* which is the result of the most recent pattern match
|
* which is the result of the most recent pattern match
|
||||||
* (see {Regexp global variables}[rdoc-ref:Regexp@Global+Variables]):
|
* (see {Regexp global variables}[rdoc-ref:Regexp@Global+Variables]):
|
||||||
*
|
*
|
||||||
|
|
Загрузка…
Ссылка в новой задаче