|
|
|
|
|
by alanctgardner2
4930 days ago
|
|
> first_user = User.find(4) && second_user = User.find(6) It looks like it would evaluate as:
first_user = (User.find(4) and second_user = User.find(6)) That is to say, the assignment comes after the boolean operation, which is unexpected. |
|
Edit: I see. if you do something like
it might bite you. You might expect it to be equivalent to which I personally think is a very, very bad practice. Parenthesis should always be used when there's even the slightest possibility that you or another maintainer/contributor might be confused about.