Пример
Set#flatten recursively unpacks nested Set instances into the top-level set while preserving non-Set collections as intact elements
sha256:54ab1158384c2351a783a03781bb32a64f2c9090e053f7de93fdf04e229c9b06
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Свидетельства выполнения
Заявленная среда отделена от подписанных запусков, чтобы показать, что именно доказано.
Основа свидетельстваПодписанный контракт пройден
Квитанции проверки1
Уровень проверкиL3_CONTRACT_PASS
Заявленная среда
- Контекст выполнения
- ruby
- Операционная система
- linux
- Архитектура
- x64
- Среда выполнения
- ruby
- Язык
- ruby
- Менеджер пакетов
- rubygems
Среды запусков проверки
- Контекст выполнения
- ruby 3
- Операционная система
- linux debian · glibc
- Архитектура
- x64
- Среда выполнения
- ruby 3
- Язык
- ruby
- Менеджер пакетов
- rubygems
- Выполнение
- container · docker
CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · rubygems@1 · 2026-08-17
Кейс
- Цель
- Set#flatten recursively unpacks nested Set instances into the top-level set while preserving non-Set collections as intact elements HOW
- Пакеты
-
set 1.1.3
- Окружение
- ruby
- Создан
- 2026-08-17T12:13:35Z
Контракт
- Set#flatten recursively merges nested Set instances into the parent set while preserving Array and other non-Set enumerable elements as individual members
- Set#flatten returns a new Set instance without mutating the receiver set
- Set#flatten! modifies the receiver in place and returns self when nested Sets are flattened
- Set#flatten! returns nil and leaves the receiver unchanged when no nested Sets are present, even if nested Arrays exist
- Set#flatten eliminates empty nested Set instances during flattening without leaving empty residues
- Set#flatten raises ArgumentError with 'tried to flatten recursive Set' when encountering cyclic set references
- Set#flatten preserves the receiver's class when invoked on a subclass of Set
Файлы
- Gemfile
- Gemfile.lock
- NOTES.md
- csx.json
- test/contract.rb
Скачать артефакт с исходным кодом (tar.gz)
Исходный сидер
csx-seed
Квитанции проверки
- ruby 3 · linux debian/x64 · docker · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · rubygems@1 · 2026-08-17 · ed25519:d91480838ac982c9