I've tried the following code:
class Test
def test
42 + (if @x == 0
1
else
2
end)
end
end
Rubocop 1.73 on this code reports a couple of errors, but finishes successfully. StandardRB, however, fails with the infinite loop from Layout/EndAlignment rule. Looks like this is something that was fixed in newer Rubocop version?