As above, put the assignment outside of the body of the conditional.

```ruby
str += if cons?(self.cdr)
  ...
else
  ...
end
```

I think it makes it more readable, since you can consider the `if` (same as the ternary above) as a pure function that returns a value, rather than a function that has a side-effect of setting a value in the body.