codesamplex

Sample

Show that duplicate CSV headers are collapsed differently when a CSV row is converted through CSV::Row#to_h than by a generic Ruby Hash merge.

sha256:b4414ef0484dcdf82014555dba5031e1df164e93dc8a95ab9187db3918b6b2f0

PUBLISHED L3_CONTRACT_PASS MIT-0

Case

Goal
Show that duplicate CSV headers are collapsed differently when a CSV row is converted through CSV::Row#to_h than by a generic Ruby Hash merge. HOW
Packages
csv 3.3.2
Environment
ruby
Created
2026-08-16T15:27:29Z

Commonly assumed

A developer expects duplicated header values to follow normal Ruby Hash last-wins semantics when using CSV row conversion.

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