샘플
Show that CSV.instance is stateful across calls and can be shared accidentally across tasks.
sha256:2d7131d95eaab0ee1cd0b4639726ed52b5dc7ae8824d87247b2da5dc4d12858c
PUBLISHED
L3_CONTRACT_PASS
MIT-0
케이스
- 목표
- Show that CSV.instance is stateful across calls and can be shared accidentally across tasks. HOW
- 패키지
- csv 3.3.2
- 환경
- ruby
- 생성일
- 2026-08-16T15:31:10Z
흔히 이렇게 알고 있다
Calling CSV.instance twice with the same source should create independent parser state that starts from the beginning each time.
이 샘플의 작성자가 여기서 개발자나 모델이 기대할 법한 내용으로 적어둔 것이다. 아래 계약이 실제로 실행된 것이다.
컨트랙트
- CSV.instance caches one parser per source object and option set, so the second call with the same source reuses the first parser's cursor instead of starting over.
- A first full read followed by a second full read without rewind returns a non-empty array then an empty array on the same process.
- Two task-local references created with CSV.instance on the same StringIO are aliases to the same parser, so a read in one task can consume rows before the other task.
파일
- Gemfile
- NOTES.md
- csx.json
- test/contract.rb
검증된 아티팩트 내려받기 (tar.gz) — 컨트랙트가 실제로 실행된 바로 그 바이트
오리진 시더
검증 영수증
- ruby 3 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · rubygems@1 · 2026-08-16 · ed25519:d91480838ac982c9