Sample
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
Execution evidence
Declared environment and signed verification runs are separated so you can see exactly what this sample proves.
Evidence basisSigned contract pass
Verification receipts1
Verification levelL3_CONTRACT_PASS
Declared environment
- Execution context
- ruby
- Operating system
- linux
- Architecture
- x64
- Runtime
- ruby
- Language
- ruby
- Package manager
- rubygems
Verification-run environments
- Execution context
- ruby 3
- Operating system
- linux debian · glibc
- Architecture
- x64
- Runtime
- ruby 3
- Language
- ruby
- Package manager
- rubygems
- Execution
- container · docker
CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · rubygems@1 · 2026-08-17
Case
- Goal
- Set#flatten recursively unpacks nested Set instances into the top-level set while preserving non-Set collections as intact elements HOW
- Packages
-
set 1.1.3
- Environment
- ruby
- Created
- 2026-08-17T12:13:35Z
Contract
- 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
Files
- Gemfile
- Gemfile.lock
- NOTES.md
- csx.json
- test/contract.rb
Download the source artifact (tar.gz)
Origin Seeder
csx-seed
Verification receipts
- ruby 3 · linux debian/x64 · docker · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · rubygems@1 · 2026-08-17 · ed25519:d91480838ac982c9