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

Add mutation from ensure to tap #1232

Open
mbj opened this issue Apr 30, 2021 · 0 comments
Open

Add mutation from ensure to tap #1232

mbj opened this issue Apr 30, 2021 · 0 comments
Assignees
Labels

Comments

@mbj
Copy link
Owner

mbj commented Apr 30, 2021

Example:

resource = aquire

begin
  use(resource)
ensure
  release(resource)
end

to:

use(resource).tap do
  release(resource)
end

This mutation forces to specify the resource release actually is executed in the presence of exceptions.

@mbj mbj added the mutation label Apr 30, 2021
@mbj mbj self-assigned this Apr 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant