On Nov 12, 2007, at 4:20 PM, furtive.clown / gmail.com wrote:

> #as is also used to make function calls prettier:
>
> filename = File.basename(input.map { |t|
>    t.gsub(re, "_")
> }.join)
>
> filename = input.map { |t|
>    t.gsub(re, "_")
> }.join.as { |t|
>    File.basename(t)
> }
>
> I greatly prefer the latter.

I would use:

   file_name = File.basename(input.join.gsub(re, "_"))

James Edward Gray II