summaryrefslogtreecommitdiff
path: root/re.c
diff options
context:
space:
mode:
authorBurdette Lamar <BurdetteLamar@Yahoo.com>2026-01-07 17:02:22 -0600
committerGitHub <noreply@github.com>2026-01-07 18:02:22 -0500
commit3ea6ec8344a07e2d10ba248c69039dd4d27fd8fb (patch)
treea56171e41b5adc964c2f7790f432a61e256dd6cc /re.c
parent5230f835e807b7b6935b758de58ee26da6cb6a60 (diff)
[DOC] Harmonize #=~ methods (#15814)
Diffstat (limited to 're.c')
-rw-r--r--re.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/re.c b/re.c
index 027fa597f4..b2c1909c15 100644
--- a/re.c
+++ b/re.c
@@ -3663,12 +3663,11 @@ reg_match_pos(VALUE re, VALUE *strp, long pos, VALUE* set_match)
/*
* call-seq:
- * regexp =~ string -> integer or nil
+ * self =~ other -> integer or nil
*
* Returns the integer index (in characters) of the first match
- * for +self+ and +string+, or +nil+ if none;
- * also sets the
- * {rdoc-ref:Regexp global variables}[rdoc-ref:Regexp@Global+Variables]:
+ * for +self+ and +other+, or +nil+ if none;
+ * updates {Regexp-related global variables}[rdoc-ref:Regexp@Global+Variables].
*
* /at/ =~ 'input data' # => 7
* $~ # => #<MatchData "at">