Ejemplo
Disprove the assumption that Mustermann match results are Ruby MatchData-like in index ordering.
sha256:78294c4c14e8f3a3a939835768466490bf1fb141543c7e35872aed2ce7070745
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Caso
- Objetivo
- Disprove the assumption that Mustermann match results are Ruby MatchData-like in index ordering. HOW
- Paquetes
- mustermann 4.0.0
- Entorno
- ruby
- Creado
- 2026-08-16T15:54:24Z
Lo que suele suponerse
A successful Mustermann match should behave like Ruby MatchData, with index 0 equal to the full matched path.
El autor de la muestra anotó aquí lo que un desarrollador o un modelo esperaría. El contrato de abajo es lo que realmente se ejecutó.
Contrato
- A match on `Mustermann.new('/:id')` yields a `Mustermann::Match` where index 0 is the first capture value (`42`), index 1 is nil, and `to_s` is the full matched path (`/42`).
- In this match shape, `match.params` and `match.to_h` both return `{"id"=>"42"}` while `match['id']` exposes the named capture directly.
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