This commit is contained in:
Burdette Lamar 2024-08-07 14:59:57 -05:00 коммит произвёл GitHub
Родитель 2a31410ebe
Коммит 3719b3d74d
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
1 изменённых файлов: 10 добавлений и 8 удалений

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

@ -5408,16 +5408,18 @@ ary_make_hash_by(VALUE ary)
/*
* call-seq:
* array - other_array -> new_array
* self - other_array -> new_array
*
* Returns a new +Array+ containing only those elements from +array+
* that are not found in +Array+ +other_array+;
* items are compared using <tt>eql?</tt>;
* the order from +array+ is preserved:
* Returns a new array containing only those elements of +self+
* that are not found in +other_array+;
* the order from +self+ is preserved:
*
* [0, 1, 1, 2, 1, 1, 3, 1, 1] - [1] # => [0, 2, 3]
* [0, 1, 2, 3] - [3, 0] # => [1, 2]
* [0, 1, 2] - [4] # => [0, 1, 2]
* [0, 1, 1, 2, 1, 1, 3, 1, 1] - [1] # => [0, 2, 3]
* [0, 1, 1, 2, 1, 1, 3, 1, 1] - [3, 2, 0, :foo] # => [1, 1, 1, 1, 1, 1]
* [0, 1, 2] - [:foo] # => [0, 1, 2]
*
* Element are compared using method <tt>#eql?</tt>
* (as defined in each element of +self+).
*
* Related: Array#difference.
*/