On Mon, Oct 13, 2008 at 21:08, Ryan Davis <ryand-ruby / zenspider.com> wrote:

> On Oct 13, 2008, at 11:27 , Thomas Sawyer wrote:

> I frequently need to do:
>
>  File.dirname(File.dirname(__FILE__))

I realize that I'm responding to a joke, but wouldn't it perhaps be
nice if File.dirname took an optional second argument that allowed you
to specify how many levels up you want to go?

I actually implemented this at work, simply because I was doing a lot
of nested File.dirname calls.