dry-types icon indicating copy to clipboard operation
dry-types copied to clipboard

Allows Default to return the right Result

Open elcuervo opened this issue 7 months ago • 0 comments

Fixes instances when a Default type runs #try with a failing value.

Closes #469

Types::Integer.default(1).try("a")
# => #<Dry::Types::Result::Failure input="a" error=#<Dry::Types::ConstraintError: "a" violates constraints (type?(Integer, "a") failed)>>

elcuervo avatar Jul 24 '24 19:07 elcuervo