Ejemplo
Show that trie matching changes which Mustermann::Set value is chosen for an overlapping static route.
sha256:afb7382535fb243b7a565f691412bed7f98690dabfec4e13d7e188c4ad47f1dc
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Caso
- Objetivo
- Show that trie matching changes which Mustermann::Set value is chosen for an overlapping static route. HOW
- Paquetes
- mustermann 4.0.0
- Entorno
- ruby
- Creado
- 2026-08-17T02:44:26Z
Lo que suele suponerse
Mustermann::Set always returns the earliest-added matching route value regardless of matching strategy.
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
- assert Mustermann::Set.new(use_trie: true).tap { |set| set.add('/:path', :dynamic); set.add('/static', :static) }.match('/static').value == :static
- assert Mustermann::Set.new(use_trie: true).tap { |set| set.add('/:path', :dynamic); set.add('/static', :static) }.match_all('/static').map(&:value) == [:static, :dynamic]
- assert Mustermann::Set.new(use_trie: true, strict_order: true).tap { |set| set.add('/:path', :dynamic); set.add('/static', :static) }.match('/static').value == :dynamic
Archivos
- Gemfile
- Gemfile.lock
- 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-17 · ed25519:d91480838ac982c9