Beispiel
set 1.1.1: Set#to_json does not produce a JSON array: it inherits the Object fallback from json gem, which calls to_s.to_json and returns an inspect string, silently corrupting any round-trip
Verifiziertes Beispiel für gem set 1.1.1: Set#to_json does not produce a JSON array: it inherits the Object fallback from json gem, which calls to_s.to_json…
sha256:22a9d32f68b3b4b16f4061794878c5f7c13b8287e92bacc2a67e87c730f3d6b5
Dieses Netzwerk bietet eine Sache: ein Sample, das baut. Es hat es in einer Sandbox ausgeführt und die signierte Quittung behalten. Es bewertet nichts und garantiert nichts — ob derselbe Code bei Ihnen baut, hat es nicht gemessen.
Wie viele verschiedene Signaturschlüssel eine bestandene Vertragsquittung eingereicht haben. Einer ist der Autor allein; mehr als einer heißt, jemand anderes hat es auch gebaut. Ein Schlüssel wird selbst erzeugt und hat keine registrierte Identität dahinter — gezählt werden Schlüssel, nicht Personen.
MIT-0
Ausführungsbelege
Die deklarierte Umgebung und die signierten Läufe stehen getrennt, damit Sie genau sehen, was dieses Sample ausgeführt hat und wo.
- Beleggrundlage
- Signierter Vertrag bestanden
- Verifizierungsbelege
- 2
- Signaturschlüssel, die es gebaut haben
- 2
Deklarierte Umgebung
ruby linux x64 ruby ruby bundler
Umgebungen der Verifizierungsläufe
| Umgebung | Contract | Stufen | Lauf |
|---|---|---|---|
| ruby 3 · linux debian/x64 · docker ed25519:d91480838ac982c9 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · rubygems@1 |
2026-08-17 |
| ruby 3 · linux debian/x64 · docker ed25519:2175b912ea1c23b1 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · rubygems@1 |
2026-08-18 |
Fall
HOW- Ziel
- Set#to_json does not produce a JSON array: it inherits the Object fallback from json gem, which calls to_s.to_json and returns an inspect string, silently corrupting any round-trip
- Pakete
- Symbole
-
- Set#to_json
- JSON::Ext::Generator::GeneratorMethods::Object#to_json
- Umgebung
- ruby
- Erstellt
- 2026-08-17T02:47:04Z
Contract
- Set[1,2,3].to_json returns a JSON string literal (begins with a double-quote character) rather than the JSON array "[1,2,3]", because Set inherits to_json from JSON::Ext::Generator::GeneratorMethods::Object which delegates to to_s.to_json
- JSON.parse(Set[1,2,3].to_json) returns a String instance, not a Set or Array
- The round-tripped string contains the inspect marker '#<Set:' so none of the original elements are recoverable from the JSON output
- Array[1,2,3].to_json round-trips correctly as a JSON array (control: the behaviour is specific to Set, not a general json-gem limitation)
- A Set embedded as a Hash value also serialises its value as a JSON string after JSON.parse
Dateien
- Gemfile
- Gemfile.lock
- NOTES.md
- csx.json
- test/contract.rb