[DOC] Tweaks to Array#bsearch_index

This commit is contained in:
BurdetteLamar 2024-08-17 14:04:41 +01:00 коммит произвёл Peter Zhu
Родитель f5579c9278
Коммит 53e3795379
1 изменённых файлов: 6 добавлений и 4 удалений

10
array.c
Просмотреть файл

@ -3564,11 +3564,13 @@ rb_ary_bsearch(VALUE ary)
/*
* call-seq:
* array.bsearch_index {|element| ... } -> integer or nil
* array.bsearch_index -> new_enumerator
* bsearch_index {|element| ... } -> integer or nil
* bsearch_index -> new_enumerator
*
* Searches +self+ as described at method #bsearch,
* but returns the _index_ of the found element instead of the element itself.
* Returns the integer index of the element from +self+ found by a binary search,
* or +nil+ if the search found no suitable element.
*
* See {Binary Searching}[rdoc-ref:bsearch.rdoc].
*/
static VALUE