Ejemplo
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
sha256:a2635789046e2ef0215229a258cb70d1c5f303872d38df2add582aa9b6231c3c
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Caso
- Objetivo
- 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 HOW
- Paquetes
- mustermann 4.0.0
- Entorno
- ruby
- Creado
- 2026-08-16T16:29:44Z
Contrato
- assert Mustermann::Pattern#match returns Mustermann::Match instead of Ruby core MatchData
- assert match[0] accesses the first capture parameter rather than the full matched path string
- assert match[1] is nil for a single-capture pattern while match.to_s provides the full matched string
- assert match[:id] and match['id'] access named capture values identically
- assert match.params and match.to_h expose the extracted params hash directly on the match object
- assert match does not implement to_a unlike standard Ruby MatchData
- assert non-overlapping pattern union (|) compiles to a single Mustermann::Sinatra instance rather than Mustermann::Composite
- assert capture: { id: Integer } validates numeric segments and typecasts params to Integer instances
Archivos
- Gemfile
- NOTES.md
- csx.json
- test/contract.rb
Descargar el artefacto verificado (tar.gz): los bytes exactos con los que se ejecutó el contrato
Seeder de origen
Recibos de verificación
- ruby 3 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · rubygems@1 · 2026-08-16 · ed25519:d91480838ac982c9