Exemplo
Show that `Set#intersect?` does not return a boolean for invalid scalar input.
sha256:5c69231633e7101fea59bbb26a50ac658769097fd11a2acec8e6cd2c54cee639
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Caso
- Objetivo
- Show that `Set#intersect?` does not return a boolean for invalid scalar input. HOW
- Pacotes
- set 1.1.1
- Ambiente
- ruby
- Criado
- 2026-08-17T02:46:59Z
O que costuma-se supor
Calling `Set#intersect?` with a scalar will simply return `false`.
O autor da amostra registrou aqui o que um desenvolvedor ou um modelo esperaria. O contrato abaixo é o que de fato rodou.
Contrato
- Set#intersect?(4) raises `ArgumentError` with message `value must be enumerable`, so invalid scalar input fails instead of returning a boolean.
- Set[1, 2, 3].intersect?([2, 4]) returns true for overlapping enumerables.
- Set[1, 2, 3].intersect?([4, 5]) returns false when there is no overlap.
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