CodeSampleX

Sample

Serialize a T::Enum value through JSON.dump

sha256:5eb4c1715330250e8fa6c1f557809aa783f83d87070a1227be664fcb1a9a1c79

PUBLISHED L3_CONTRACT_PASS MIT-0

Case

Goal
Serialize a T::Enum value through JSON.dump HOW
Packages
sorbet-runtime 0.6.13427 json 2.9.1
Environment
ruby
Created
2026-08-17T02:48:06Z

Commonly assumed

JSON.dump on a T::Enum instance raises NoMethodError instead of serializing it

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