summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authorBurdette Lamar <BurdetteLamar@Yahoo.com>2026-01-07 17:01:56 -0600
committerGitHub <noreply@github.com>2026-01-07 18:01:56 -0500
commit5230f835e807b7b6935b758de58ee26da6cb6a60 (patch)
treefe1b9d36aa78cf9a6aa0e11b79ed1f25e2288ec6 /string.c
parent7d4983803887a45c311ab954de4527333b976500 (diff)
[DOC] Harmonize #[] methods
Diffstat (limited to 'string.c')
-rw-r--r--string.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/string.c b/string.c
index c8233be66f..234ef1edc8 100644
--- a/string.c
+++ b/string.c
@@ -5713,8 +5713,8 @@ rb_str_aref(VALUE str, VALUE indx)
/*
* call-seq:
- * self[index] -> new_string or nil
- * self[start, length] -> new_string or nil
+ * self[offset] -> new_string or nil
+ * self[offset, size] -> new_string or nil
* self[range] -> new_string or nil
* self[regexp, capture = 0] -> new_string or nil
* self[substring] -> new_string or nil
@@ -12493,11 +12493,11 @@ sym_match_m_p(int argc, VALUE *argv, VALUE sym)
/*
* call-seq:
- * symbol[index] -> string or nil
- * symbol[start, length] -> string or nil
- * symbol[range] -> string or nil
- * symbol[regexp, capture = 0] -> string or nil
- * symbol[substring] -> string or nil
+ * self[offset] -> string or nil
+ * self[offset, size] -> string or nil
+ * self[range] -> string or nil
+ * self[regexp, capture = 0] -> string or nil
+ * self[substring] -> string or nil
*
* Equivalent to <tt>symbol.to_s[]</tt>; see String#[].
*