[DOC] correct doc comment for rb_ary_aset

Signed-off-by: Edwin Garcia <egarciavalle2014@gmail.com>
This commit is contained in:
Edwing123 2024-01-18 00:56:42 -06:00 коммит произвёл GitHub
Родитель fd1bafc11f
Коммит a660e1de18
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
1 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@ -2338,7 +2338,7 @@ ary_aset_by_rb_ary_splice(VALUE ary, long beg, long len, VALUE val)
* a[1, 5] = 'foo' # => "foo"
* a # => [:foo, "foo"]
*
* When Range argument +range+ is given and +object+ is an \Array,
* When Range argument +range+ is given and +object+ is not an \Array,
* removes <tt>length - 1</tt> elements beginning at offset +start+,
* and assigns +object+ at offset +start+:
*
@ -2353,7 +2353,8 @@ ary_aset_by_rb_ary_splice(VALUE ary, long beg, long len, VALUE val)
* a # => [:foo, "foo"]
*
* If the array length is less than <tt>range.begin</tt>,
* assigns +object+ at offset <tt>range.begin</tt>, and ignores +length+:
* extends the array with +nil+, assigns +object+ at offset <tt>range.begin</tt>,
* and ignores +length+:
*
* a = [:foo, 'bar', 2]
* a[6..50] = 'foo' # => "foo"