Project

General

Profile

Actions

Feature #12194

closed

File.dirname optional parameter

Added by nobu (Nobuyoshi Nakada) over 8 years ago. Updated over 3 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:74448]

Description

As talked at the last developers' meeting, I propose an addition of an optional parameter to File.dirname.

Often I see the code, like

File.dirname(File.dirname(path)) # or
File.expand_path("../..", path)

which are not concise.

This proposal can make them as:

File.dirname(path, 2)

Patch

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0