codesamplex

Sample

Handle Set#to_set returning self on Set receivers and downcasting Set subclasses to base Set when klass is left unset

sha256:911142f7a4bef266833a736d6209fa98347340da9b948a2a186966668a37fa8d

PUBLISHED L3_CONTRACT_PASS MIT-0

Case

Goal
Handle Set#to_set returning self on Set receivers and downcasting Set subclasses to base Set when klass is left unset HOW
Packages
set 1.1.1
Environment
ruby
Created
2026-08-16T16:50:57Z

Commonly assumed

Calling to_set on an existing Set produces a new Set instance for safe mutation, and calling to_set on a Set subclass preserves the receiver subclass.

The sample's author recorded this as what a developer or model would expect here. The contract below is what actually ran.

Contract

Files

Download the verified artifact (tar.gz) — the exact bytes the contract ran against

Origin Seeder

csx-seed

Verification receipts