Exemplo
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
- Pacotes
- mustermann 4.0.0
- Ambiente
- ruby
- Criado
- 2026-08-16T15:54:24Z
O que costuma-se supor
A successful Mustermann match should behave like Ruby MatchData, with index 0 equal to the full matched path.
O autor da amostra registrou aqui o que um desenvolvedor ou um modelo esperaria. O contrato abaixo é o que de fato rodou.
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.
Arquivos
- Gemfile
- NOTES.md
- csx.json
- test/contract.rb
Baixar o artefato verificado (tar.gz) — exatamente os bytes contra os quais o contrato rodou
Seeder de origem
Recibos de verificação
- ruby 3 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · rubygems@1 · 2026-08-16 · ed25519:d91480838ac982c9