Actions
Bug #21805
openWrong "key not found" in NoMatchingPatternKeyError when destructuring Data
Bug #21805:
Wrong "key not found" in NoMatchingPatternKeyError when destructuring Data
Status:
Open
Assignee:
-
Target version:
-
ruby -v:
ruby 4.0.0 (2025-12-25 revision 553f1675f3) +PRISM [arm64-darwin24]
Description
Consider
Foo = Data.define(:x)
Foo.new(1) => {x:, z:}
It raises #<data Foo x=1>: key not found: :x (NoMatchingPatternKeyError)
Clearly the message is misleading, as it is key :z that is missing.
No data to display
Actions