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

Returns nil when AM::Errors#delete doesn't delete anything: #36654

Merged
merged 1 commit into from Jul 15, 2019

Conversation

Edouard-chin
Copy link
Member

@Edouard-chin Edouard-chin commented Jul 10, 2019

Returns nil when AM::Errors#delete doesn't delete anything:

  • AM::Errors#delete currently returns an empty array when trying
    to delete an error that doesn't exist.

    This behaviour is surprising and I think it would be better
    to no return a truthy value but instead return nil like
    Hash#delete does.

cc/ @rafaelfranca @casperisfine

- `AM::Errors#delete` currently returns an empty array when trying
  to delete an error that doesn't exist.

  This behaviour is surprising and I think it would be better
  to no return a truthy value but instead return nil like
  `Hash#delete` does.
@rafaelfranca rafaelfranca merged commit 43c27e4 into rails:master Jul 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants