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

Conditional assignment #2416

Merged
merged 2 commits into from
Nov 11, 2015
Merged

Conversation

rrosenblum
Copy link
Contributor

No description provided.

@rrosenblum rrosenblum force-pushed the conditional_assignment2 branch from 13cf4e8 to 0154441 Compare November 10, 2015 21:20
Description: >-
Use the return value of `if` and `case` statements for
assignment to a variable instead of assigning that variable
inside of each branch
Copy link
Contributor

Choose a reason for hiding this comment

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

Small tweak: end sentence with a period.

@alexdowad
Copy link
Contributor

👍

@rrosenblum rrosenblum force-pushed the conditional_assignment2 branch from 0154441 to 15a2d3d Compare November 10, 2015 21:45
@rrosenblum rrosenblum changed the title Conditional assignment2 Conditional assignment Nov 10, 2015
@rrosenblum rrosenblum force-pushed the conditional_assignment2 branch from 15a2d3d to b8bb1f0 Compare November 10, 2015 22:04
@bbatsov
Copy link
Collaborator

bbatsov commented Nov 10, 2015

31st of July? :-) This has been in the works for quite a while. :-)

@rrosenblum
Copy link
Contributor Author

31st of July? :-) This has been in the works for quite a while. :-)

Yeah, I have been working on this on and off for quite a while. The design has completely changed on it at least twice.

bbatsov added a commit that referenced this pull request Nov 11, 2015
@bbatsov bbatsov merged commit a84ae33 into rubocop:master Nov 11, 2015
@bbatsov
Copy link
Collaborator

bbatsov commented Nov 11, 2015

The code is a bit dense (a few comments here and there might be useful), but overall it looks OK to me. I noticed the tests were pretty exhaustive and that's the most important thing. 👍

@rrosenblum
Copy link
Contributor Author

I will add some comments and submit a new PR.

@rrosenblum rrosenblum deleted the conditional_assignment2 branch November 12, 2015 02:30
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.

3 participants