Simon Strandgaard wrote:
> 
> [1, 2, 3].join {|x| "<td>#{x}</td>"}   
> 
>           =>   "<td>1</td><td>2</td><td>3</td>"

What, you don't like the utter simplicity of the following? ;)

[1, 2, 3].map {|x| "<td>#{x}</td>"}.join

I guess the intermediate array is point against this, though.

Somehow, I would expect Array#join to pass two args to the block, like this:

    [1,2,3].join {|x,y| x < y ? " < " : " >= " }

     # ==> "1 < 2 < 3"