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

Handle simple guards using return #1062

Merged
merged 1 commit into from Jun 25, 2017

Conversation

Projects
None yet
1 participant
@presidentbeef
Owner

presidentbeef commented Jun 24, 2017

This only handles the simple case of

def cool_method
  return unless ['a', 'b'].include? x

  something_dangerous_but_now_benign(x)
end

Fixes #1057

@presidentbeef presidentbeef merged commit f38416f into master Jun 25, 2017

2 checks passed

ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@presidentbeef presidentbeef deleted the early_return_guard branch Jun 25, 2017

Repository owner locked and limited conversation to collaborators Aug 7, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.