Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a regression in coerce_with when coercion returns nil #2026

Merged
merged 2 commits into from
Mar 25, 2020

Conversation

misdoro
Copy link
Contributor

@misdoro misdoro commented Mar 20, 2020

Previously nil was handled as valid value for coercion for integer parameters.

With refactoring introduced in 1.3.0 integer parameter coerced with a custom method can't coerce to nil any more.

This change reverts back to previous behaviour where coercion to nil was allowed.

…ns nil

Previously nil was handled as valid value for coercion for integer parameters.

With refactoring introduced in 1.3.0 integer parameter coerced with a custom method can't coerce to nil any more.

This change reverts back to previous behavior where coercion to nil was allowed.
CHANGELOG.md Outdated Show resolved Hide resolved
@misdoro
Copy link
Contributor Author

misdoro commented Mar 20, 2020

I think I would want a sanity check from @dnesteryuk for this PR.

If this is not a regression but a breaking change that was introduced by design, it may well just make sense to update the UPGRADING.md

@dblock
Copy link
Member

dblock commented Mar 20, 2020

I err on the side of caution and would update UPGRADING anyway.

@dnesteryuk all yours

Copy link
Member

@dnesteryuk dnesteryuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@dnesteryuk dnesteryuk merged commit 0219c75 into ruby-grape:master Mar 25, 2020
@misdoro misdoro deleted the coerce_with_regression branch March 25, 2020 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants