bqsoft/ruby-style-guide — pull request #3 by codezomb (2014-03-02 19:52:00+00:00)
Title: remove the constraint for not assigning in a conditional

While I'm not 100% opposed here, I'm not sure I completely agree with this rule. I also feel it contradicts another rule, which states:

> Don't use parentheses around the condition of an `if/unless/while/until`

From a logical, and functional standpoint the two are identical, one is just wordier than the other.

```ruby
if v = array.grep(/foo/)
do_something(v)
ebd
```

vs

```ruby
v = array.grep(/foo/)
if v
do_something(v)
end
```

However, I do see this rule being applied in more of a situation like the following:

```ruby
v = array.grep(/foo/)
if v == other_var
do_something(v)
end