codesamplex

示例

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

案例

目标
Manage IO stream lifecycles across CSV.parse, CSV.open, and CSV.foreach without leaking file descriptors or unexpectedly closing caller-provided streams HOW
csv 3.3.2
环境
ruby
创建时间
2026-08-16T15:31:31Z

常见的想当然

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.

这是本样本作者记下的、开发者或模型在此处通常会有的预期。下面的契约才是真正运行过的东西。

契约

文件

下载已验证的构件 (tar.gz) — 契约实际运行的那些字节

原始种子者

csx-seed

验证回执