rails/rails — pull request #3510 by avakhov (2011-11-04 06:41:27+00:00)
Title: Safe join array arg in capture and content_tag methods

I think it helps to build html in helpers and libraries likes:

``` ruby
content_tag :ul do
@posts.map{|post| content_tag(:li, post.title)}
end
```

or

``` ruby
content_tag :div do
[].tap do |out|
out << content_tag(:h1, 'Title')
out << content_tag(:p, 'text') if some_condition
end
end
```

I'm using this pattern often with safe_join method.