[前][次][番号順一覧][スレッド一覧]

ruby-changes:71348

From: Kazuhiro <ko1@a...>
Date: Wed, 9 Mar 2022 15:16:12 +0900 (JST)
Subject: [ruby-changes:71348] b068a53dc9 (master): [DOC] Fix default offset of String#byterindex

https://git.ruby-lang.org/ruby.git/commit/?id=b068a53dc9

From b068a53dc9f38e98141c8b43249c73289af557bb Mon Sep 17 00:00:00 2001
From: Kazuhiro NISHIYAMA <zn@m...>
Date: Wed, 9 Mar 2022 15:15:11 +0900
Subject: [DOC] Fix default offset of String#byterindex

---
 string.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/string.c b/string.c
index 67ea072407..716017ac59 100644
--- a/string.c
+++ b/string.c
@@ -4262,8 +4262,8 @@ rb_str_byterindex(VALUE str, VALUE sub, long pos) https://github.com/ruby/ruby/blob/trunk/string.c#L4262
 
 /*
  *  call-seq:
- *    byterindex(substring, offset = self.length) -> integer or nil
- *    byterindex(regexp, offset = self.length) -> integer or nil
+ *    byterindex(substring, offset = self.bytesize) -> integer or nil
+ *    byterindex(regexp, offset = self.bytesize) -> integer or nil
  *
  *  Returns the \Integer byte-based index of the _last_ occurrence of the given +substring+,
  *  or +nil+ if none found:
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]