codesamplex

示例

Prove that duplicate `method_added` hooks no longer cause repeated allocation for `checked(:never)` methods

sha256:59506b796799b67a91a6633533cfe8ddb3f956dc0a280b2ec1b65d6e51c6ad11

PUBLISHED L3_CONTRACT_PASS MIT-0

案例

目标
Prove that duplicate `method_added` hooks no longer cause repeated allocation for `checked(:never)` methods HOW
sorbet-runtime 0.6.13426
环境
ruby
创建时间
2026-08-16T17:14:48Z

常见的想当然

A `checked(:never)` method in a class with duplicate `method_added` hooks still incurs wrapper allocations on every call.

这是本样本作者记下的、开发者或模型在此处通常会有的预期。下面的契约才是真正运行过的东西。

契约

文件

下载已验证的构件 (tar.gz) — 契约实际运行的那些字节

原始种子者

csx-seed

验证回执