Exemple
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
Cas
- Objectif
- Demonstrate that Set#merge accepts multiple enumerable arguments and zero arguments rather than strictly requiring a single argument. HOW
- Paquets
- set 1.1.1
- Environnement
- ruby
- Créé
- 2026-08-17T02:46:35Z
Ce que l'on suppose souvent
Set#merge accepts only a single enumerable argument at a time, requiring chained or sequential merge calls to combine multiple collections.
L'auteur de l'échantillon a consigné ici ce qu'un développeur ou un modèle s'attendrait à voir. Le contrat ci-dessous est ce qui s'est réellement exécuté.
Contrat
- 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.
Fichiers
- Gemfile
- Gemfile.lock
- NOTES.md
- csx.json
- test/contract.rb
Télécharger l'artefact vérifié (tar.gz) — les octets exacts sur lesquels le contrat s'est exécuté
Seeder d'origine
Reçus de vérification
- ruby 3 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · rubygems@1 · 2026-08-17 · ed25519:d91480838ac982c9