codesamplex

示例

Sinatra 4 removes the IndifferentHash initializer that merged a hash argument, silently producing an empty hash with the argument as the default value instead

sha256:505354b2db0a9e15b3c1720605ee174c820a6c6345acea3e8f620bc078351ab0

PUBLISHED L3_CONTRACT_PASS MIT-0

案例

目标
Sinatra 4 removes the IndifferentHash initializer that merged a hash argument, silently producing an empty hash with the argument as the default value instead HOW
sinatra 4.2.1
环境
ruby
创建时间
2026-08-16T17:07:41Z

常见的想当然

Sinatra::IndifferentHash.new({"role" => "admin"}) produces a populated hash where the string and symbol keys both resolve to "admin", matching the same pattern that worked in Sinatra 3

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

契约

文件

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

原始种子者

csx-seed

验证回执