codesamplex

Sample

Manage IO stream lifecycles across CSV.parse, CSV.open, and CSV.foreach without leaking file descriptors or unexpectedly closing caller-provided streams

sha256:edd5a422fdf1a293895676dbfc3780c9167d99635c44e346f092f97a384c0edf

PUBLISHED L3_CONTRACT_PASS MIT-0

Case

Goal
Manage IO stream lifecycles across CSV.parse, CSV.open, and CSV.foreach without leaking file descriptors or unexpectedly closing caller-provided streams HOW
Packages
csv 3.3.2
Environment
ruby
Created
2026-08-16T15:31:31Z

Commonly assumed

CSV.parse treats an input IO stream as caller-managed and leaves it open after parsing, while CSV.open and CSV.foreach automatically release underlying file handles.

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