Exemplo
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
- Pacotes
- set 1.1.1
- Ambiente
- ruby
- Criado
- 2026-08-17T02:46:35Z
O que costuma-se supor
Set#merge accepts only a single enumerable argument at a time, requiring chained or sequential merge calls to combine multiple collections.
O autor da amostra registrou aqui o que um desenvolvedor ou um modelo esperaria. O contrato abaixo é o que de fato rodou.
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.
Arquivos
- Gemfile
- Gemfile.lock
- NOTES.md
- csx.json
- test/contract.rb
Baixar o artefato verificado (tar.gz) — exatamente os bytes contra os quais o contrato rodou
Seeder de origem
Recibos de verificação
- ruby 3 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · rubygems@1 · 2026-08-17 · ed25519:d91480838ac982c9