[TxMt] Converting a single-line block into a multi-line block

Matt Mower matt.mower at gmail.com
Mon Nov 28 14:38:52 UTC 2005


On 28/11/05, David Lee <david at davelee.com.au> wrote:
> just to complicate matters, I much prefer the curlybrace style
> expansion. It's also more robust:
>
> items.collect { |i| i.children  }.reject{|c| c.children.empty? }
>
> with your regex macro becomes
>
> items.collect do |i|
>    i.children
> end.reject{|c| c.children.empty? }
>
> which is illegal Ruby; with a curly-style expansion your macro holds
> up admirably.

Ummm there's nothing illegal about that expression.

Regards,

Matt
--
Matt Mower :: http://matt.blogs.it/



More information about the textmate mailing list