presidentbeef/brakeman — pull request #270 by presidentbeef (2013-02-19 02:38:25+00:00)
Title: Fix multiple assignments in if statements

Brakeman was turning code like this:

```ruby
if something
x = 1
x = 2
x = 3
end

puts x
```

into

```ruby
if something
x = 1
x = 2
x = 3
end

puts((1 or 2) or 3)
```

Oops! That's not good. And that's why Brakeman wasn't working on Redmine. Shame! :cold_sweat:

Now Brakeman is slightly smarter. This code:

```ruby
x = 1

if something
x = 2
x = 3
y = 10
else
y = 20
end

y = y * 0

puts x, y
```

Will turn into:

```ruby
x = 1

if something
x = 2
x = 3
y = 10
else
y = 20
end

y = 0

puts((1 or 3), 0)
```

And Brakeman can scan Redmine again.