1 min readOct 10, 2016
Thanks for the response.
You a probably right about the memory consumption, but mutating a string feels so wrong to me. Even in Ruby :)
After looking at the example again, I think I would use a map and join if I was using this in a real Ruby project:
def concat_messages(items)
items
.select(&:ok?)
.map(&:message)
.join("")
end