From: nobu@... Date: 2016-03-18T07:51:55+00:00 Subject: [ruby-core:74448] [Ruby trunk Feature#12194] File.dirname optonal parameter Issue #12194 has been reported by Nobuyoshi Nakada. ---------------------------------------- Feature #12194: File.dirname optonal parameter https://bugs.ruby-lang.org/issues/12194 * Author: Nobuyoshi Nakada * Status: Open * Priority: Normal * Assignee: ---------------------------------------- As talked at the last developers' meeting, I propose an addition of an optional parameter to `File.dirname`. Often I see the code, like ```ruby File.dirname(File.dirname(path)) # or File.expand_path("../..", path) ``` which are not concise. This proposal can make them as: ```ruby File.dirname(path, 2) ``` https://github.com/ruby/ruby/compare/trunk...nobu:feature/dirname-level?expand=1 -- https://bugs.ruby-lang.org/ Unsubscribe: