codesamplex

サンプル

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

ケース

ゴール
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
パッケージ
csv 3.3.2
環境
ruby
作成日
2026-08-16T15:27:29Z

よくある思い込み

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

このサンプルの作者が、ここで開発者やモデルが期待するであろうこととして記録したもの。下の契約が実際に実行されたものだ。

コントラクト

ファイル

検証済みアーティファクトをダウンロード (tar.gz) — 契約が実行された正確なバイト列

オリジンシーダー

csx-seed

検証レシート