The use of parentheses, even those not required to enforce a desired order of operations, can clarify the intent behind a piece of code. But redundant pairs of parentheses could be misleading, and should be removed.
x = (y / 2 + 1) # Compliant even if the parenthesis are ignored by the compiler if a && ((x+y > 0)) # Noncompliant # ... end return ((x + 1)) # Noncompliant
x = (y / 2 + 1) if a && (x+y > 0) # ... end return (x + 1)