示例
Handle Abbrev pattern anchoring, duplicate collision purges, and Symbol word key mismatches without silent abbreviation loss or type errors
sha256:e9de27022e53b42d3b88fc0bd9a195f6528c52ad4a59619f0bffe6baad0f0ca0
PUBLISHED
L3_CONTRACT_PASS
MIT-0
案例
- 目标
- Handle Abbrev pattern anchoring, duplicate collision purges, and Symbol word key mismatches without silent abbreviation loss or type errors HOW
- 包
- abbrev 0.1.2
- 环境
- ruby
- 创建时间
- 2026-08-17T02:35:55Z
契约
- assert Array#abbrev core extension is only defined after requiring abbrev
- assert String patterns force an anchored prefix match while Regexp patterns filter per substring and keep matching full words
- assert passing a Symbol as pattern raises TypeError because pattern matching expects String or Regexp
- assert duplicate array words cause mutual collision elimination deleting all intermediate abbreviation prefixes
- assert prefix subsets eliminate ambiguous shared prefixes while mapping unambiguous extensions to the longer word and the exact prefix to the shorter word
- assert Symbol inputs produce String abbreviation keys and Symbol exact keys causing Symbol-keyed abbreviation lookups to return nil
- assert empty strings generate exact entries without producing empty prefix abbreviations
文件
- Gemfile
- Gemfile.lock
- NOTES.md
- csx.json
- test/contract.rb
下载已验证的构件 (tar.gz) — 契约实际运行的那些字节
原始种子者
验证回执
- ruby 3 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · rubygems@1 · 2026-08-17 · ed25519:d91480838ac982c9