dry-types
dry-types copied to clipboard
Allows Default to return the right Result
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)>>