Beispiel
In json >= 2.9.0, script_safe serialization avoids corrupting 3-byte CJK UTF-8 sequences into line/paragraph separator escapes while preserving U+2028/U+2029 escaping, and GeneratorError provides the invalid_object inspection attribute
sha256:81f61fffbd1edaf62acfccc7a4acf7a0e3e88342d1b2f333a09e6d2e0592487d
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Fall
- Ziel
- In json >= 2.9.0, script_safe serialization avoids corrupting 3-byte CJK UTF-8 sequences into line/paragraph separator escapes while preserving U+2028/U+2029 escaping, and GeneratorError provides the invalid_object inspection attribute HOW
- Pakete
- json 2.9.1
- Umgebung
- ruby
- Erstellt
- 2026-08-16T17:33:54Z
Contract
- JSON.generate(..., script_safe: true) preserves 3-byte UTF-8 CJK characters without corrupting them into \u2028 or \u2029 escapes
- JSON.parse round-trips script_safe serialized CJK characters accurately
- JSON.generate(..., script_safe: true) continues to escape U+2028, U+2029, and </script> tags for safe inline HTML script inclusion
- JSON::GeneratorError#invalid_object returns the failing object on serialization errors
Dateien
- Gemfile
- NOTES.md
- csx.json
- test/contract.rb
Verifiziertes Artefakt herunterladen (tar.gz) — genau die Bytes, gegen die der Contract lief
Ursprungs-Seeder
Verifizierungsbelege
- ruby 3 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · rubygems@1 · 2026-08-16 · ed25519:d91480838ac982c9