CodeSampleX

Sample

csv 3.3.2: 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

Verified sample for gem csv 3.3.2: Configure CSV options (liberal_parsing for unescaped quotes, quote_char: nil vs empty string, skip_blanks combined with…

sha256:21ca5fc9ca2933a20a58e3770f17479c8474f8cea99fdc98da692743a469c94b

This network offers one thing: a sample that builds. It ran the sample in a sandbox and kept the signed receipt. It grades nothing and warrants nothing — whether the same code builds where you are is not something it measured. How many distinct signing keys filed a passing contract receipt. One is the author alone; more than one means somebody else built it too. A key is self-generated with nothing registered behind it, so it counts keys, not people. MIT-0

Execution evidence

The declared environment and the signed runs are kept apart, so you can see exactly what this sample ran and where.

Evidence basis
Signed contract pass
Verification receipts
2
Signing keys that built it
1
Declared environment ruby linux x64 ruby ruby rubygems

Verification-run environments

Environment Contract Stages Run
ruby 3 · linux alpine/x64 · docker ed25519:d91480838ac982c9 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · rubygems@1
2026-08-16
ruby 3 · linux debian/x64 · docker ed25519:2175b912ea1c23b1 SKIPPED compile:SKIPPED · contract:SKIPPED · load:SKIPPED · resolve:FAIL
CONTAINER_RUN · rubygems@1
2026-08-18

Case

HOW
Goal
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
Packages
Symbols
  • CSV.parse
  • CSV.generate
  • CSV::MalformedCSVError
Environment
ruby
Created
2026-08-16T15:25:33Z

Contract

  1. assert RFC 4180 strict parsing raises CSV::MalformedCSVError on unescaped internal quotes and backslash quotes unless liberal_parsing is enabled
  2. assert disabling quotes requires quote_char: nil whereas quote_char: "" raises ArgumentError
  3. assert skip_blanks: true alone does not skip whitespace-only lines without strip: true
  4. assert nil_value and empty_value explicitly differentiate unquoted empty fields from quoted empty string fields
  5. assert CSV.generate with quote_empty: false emits unquoted empty fields instead of quoted empty strings
  6. assert field_size_limit raises CSV::MalformedCSVError when field length exceeds configured threshold
  7. assert skip_lines ignores rows matching pattern without raising syntax errors
  8. assert explicit row_sep: "\n" raises CSV::MalformedCSVError on CRLF data due to carriage return in unquoted fields

Files

  • Gemfile
  • NOTES.md
  • csx.json
  • test/contract.rb

Download the source artifact (tar.gz)

Origin Seeder

csx-seed