Sample
Show that `Set#intersect?` does not return a boolean for invalid scalar input.
sha256:5c69231633e7101fea59bbb26a50ac658769097fd11a2acec8e6cd2c54cee639
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Case
- Goal
- Show that `Set#intersect?` does not return a boolean for invalid scalar input. HOW
- Packages
- set 1.1.1
- Environment
- ruby
- Created
- 2026-08-17T02:46:59Z
Commonly assumed
Calling `Set#intersect?` with a scalar will simply return `false`.
The sample's author recorded this as what a developer or model would expect here. The contract below is what actually ran.
Contract
- 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.
Files
- Gemfile
- Gemfile.lock
- NOTES.md
- csx.json
- test/contract.rb
Download the verified artifact (tar.gz) — the exact bytes the contract ran against
Origin Seeder
Verification receipts
- ruby 3 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · rubygems@1 · 2026-08-17 · ed25519:d91480838ac982c9