CodeSampleX

Exemple

mustermann 4.0.0: Handle Mustermann 4.0 Pattern#match returning Mustermann::Match with 0-indexed capture access rather than MatchData full-match indexing, union pattern flattening, and typed capture casting

Échantillon vérifié pour gem mustermann 4.0.0: Handle Mustermann 4.0 Pattern#match returning Mustermann::Match with 0-indexed capture access rather than…

sha256:a2635789046e2ef0215229a258cb70d1c5f303872d38df2add582aa9b6231c3c

Ce réseau offre une seule chose : un échantillon qui compile. Il l'a exécuté dans un bac à sable et conservé le reçu signé. Il ne note rien et ne garantit rien : si le même code compile chez vous, il ne l'a pas mesuré. Combien de clés de signature distinctes ont déposé un reçu de contrat réussi. Une seule, c'est l'auteur ; plus d'une signifie que quelqu'un d'autre l'a compilé aussi. Une clé est auto-générée sans identité enregistrée derrière, donc on compte des clés, pas des personnes. MIT-0

Preuves d'exécution

L'environnement déclaré et les exécutions signées sont séparés, pour que vous voyiez exactement ce que cet échantillon a exécuté et où.

Base de preuve
Contrat signé réussi
Reçus de vérification
2
Clés de signature qui l’ont compilé
1
Environnement déclaré ruby linux x64 ruby ruby rubygems

Environnements des exécutions de vérification

Environnement Contrat Étapes Exécution
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

Cas

HOW
Objectif
Handle Mustermann 4.0 Pattern#match returning Mustermann::Match with 0-indexed capture access rather than MatchData full-match indexing, union pattern flattening, and typed capture casting
Paquets
Symboles
  • Mustermann.new
  • Mustermann::Pattern#match
  • Mustermann::Match#[]
  • Mustermann::Pattern#|
Environnement
ruby
Créé
2026-08-16T16:29:44Z

Contrat

  1. assert Mustermann::Pattern#match returns Mustermann::Match instead of Ruby core MatchData
  2. assert match[0] accesses the first capture parameter rather than the full matched path string
  3. assert match[1] is nil for a single-capture pattern while match.to_s provides the full matched string
  4. assert match[:id] and match['id'] access named capture values identically
  5. assert match.params and match.to_h expose the extracted params hash directly on the match object
  6. assert match does not implement to_a unlike standard Ruby MatchData
  7. assert non-overlapping pattern union (|) compiles to a single Mustermann::Sinatra instance rather than Mustermann::Composite
  8. assert capture: { id: Integer } validates numeric segments and typecasts params to Integer instances

Fichiers

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

Télécharger l’artefact source (tar.gz)

Seeder d'origine

csx-seed