On Nov 12, 5:25 pm, James Edward Gray II <ja... / grayproductions.net>
wrote:
> On Nov 12, 2007, at 4:20 PM, furtive.cl... / 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, "_"))
>

Not if re has \A or \Z.  In any case you may be missing the point,
though.