On Mon, Jun 1, 2009 at 6:11 AM, Michael Fellinger <m.fellinger / gmail.com> wrote:
> require 'pathname'
>
> fn = Pathname('/a/b/c/d.e')
> # #<Pathname:/a/b/c/d.e>
>
> fn.dirname + fn.basename('.*')
> # #<Pathname:/a/b/c/d>

Passing a suffix to basename is pretty unintuitive - I'd never have
thought to look there. File.split (and/or Pathname#split) seems a lot
cleaner to me.

martin