Ejemplo
Demonstrate that Set#merge accepts multiple enumerable arguments and zero arguments rather than strictly requiring a single argument.
sha256:2d9066b6b344ce373a3c25794dab5a3006dc7b40a08549af8cb903a9892b0167
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Caso
- Objetivo
- Demonstrate that Set#merge accepts multiple enumerable arguments and zero arguments rather than strictly requiring a single argument. HOW
- Paquetes
- set 1.1.1
- Entorno
- ruby
- Creado
- 2026-08-17T02:46:35Z
Lo que suele suponerse
Set#merge accepts only a single enumerable argument at a time, requiring chained or sequential merge calls to combine multiple collections.
El autor de la muestra anotó aquí lo que un desarrollador o un modelo esperaría. El contrato de abajo es lo que realmente se ejecutó.
Contrato
- Set#merge accepts multiple enumerable arguments in a single invocation, mutating the receiver in place with elements from all passed collections and returning self.
- Set[1, 2].merge([3, 4], Set[4, 5], 6..7) returns the mutated receiver containing all 7 distinct elements.
- Set[1, 2].merge() with zero arguments leaves the receiver unchanged and returns self without raising ArgumentError.
Archivos
- Gemfile
- Gemfile.lock
- NOTES.md
- csx.json
- test/contract.rb
Descargar el artefacto verificado (tar.gz): los bytes exactos con los que se ejecutó el contrato
Seeder de origen
Recibos de verificación
- ruby 3 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · rubygems@1 · 2026-08-17 · ed25519:d91480838ac982c9