From 5a570421a5a773945aa8f9497b5d64bac809a196 Mon Sep 17 00:00:00 2001 From: Alan Wu Date: Fri, 9 Aug 2024 16:02:36 -0400 Subject: [PATCH] [DOC] Regexp.last_match returns `$~`, not `$!` --- re.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/re.c b/re.c index d54098ed83..215098ba21 100644 --- a/re.c +++ b/re.c @@ -4607,7 +4607,7 @@ match_setter(VALUE val, ID _x, VALUE *_y) * Regexp.last_match(n) -> string or nil * Regexp.last_match(name) -> string or nil * - * With no argument, returns the value of $!, + * With no argument, returns the value of $~, * which is the result of the most recent pattern match * (see {Regexp global variables}[rdoc-ref:Regexp@Global+Variables]): *