サンプル
Configure CSV options (liberal_parsing for unescaped quotes, quote_char: nil vs empty string, skip_blanks combined with strip, quote_empty, and CRLF row_sep) to avoid MalformedCSVError, ArgumentError, and silent whitespace row parsing
sha256:21ca5fc9ca2933a20a58e3770f17479c8474f8cea99fdc98da692743a469c94b
PUBLISHED
L3_CONTRACT_PASS
MIT-0
ケース
- ゴール
- Configure CSV options (liberal_parsing for unescaped quotes, quote_char: nil vs empty string, skip_blanks combined with strip, quote_empty, and CRLF row_sep) to avoid MalformedCSVError, ArgumentError, and silent whitespace row parsing HOW
- パッケージ
- csv 3.3.2
- 環境
- ruby
- 作成日
- 2026-08-16T15:25:33Z
コントラクト
- assert RFC 4180 strict parsing raises CSV::MalformedCSVError on unescaped internal quotes and backslash quotes unless liberal_parsing is enabled
- assert disabling quotes requires quote_char: nil whereas quote_char: "" raises ArgumentError
- assert skip_blanks: true alone does not skip whitespace-only lines without strip: true
- assert nil_value and empty_value explicitly differentiate unquoted empty fields from quoted empty string fields
- assert CSV.generate with quote_empty: false emits unquoted empty fields instead of quoted empty strings
- assert field_size_limit raises CSV::MalformedCSVError when field length exceeds configured threshold
- assert skip_lines ignores rows matching pattern without raising syntax errors
- assert explicit row_sep: "\n" raises CSV::MalformedCSVError on CRLF data due to carriage return in unquoted fields
ファイル
- 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