From: akr@... Date: 2014-10-14T12:30:44+00:00 Subject: [ruby-dev:48627] [ruby-trunk - Feature #10381] [Feedback] Pathname#mkdir_p, Pathname#makedirs が欲しい Issue #10381 has been updated by Akira Tanaka. Status changed from Open to Feedback mkdir_p はコマンド名っぽくておすすめしたくないな、と思っています。 makedirs については mkdir と単語の略しかたが違っていて気に入らなかったような気がします。 あと Pathname では基本的には alias でいろいろな名前をつけることはしていないという話もあります。 ---------------------------------------- Feature #10381: Pathname#mkdir_p, Pathname#makedirs が欲しい https://bugs.ruby-lang.org/issues/10381#change-49431 * Author: 三村 益隆 * Status: Feedback * Priority: Normal * Assignee: * Category: * Target version: ---------------------------------------- Pathname#mkpath にも FileUtils#mkpath と他の同じ挙動をするメソッド名が欲しいです。 ~~~ diff --git a/ext/pathname/lib/pathname.rb b/ext/pathname/lib/pathname.rb index 82541e9..40c3ae1 100644 --- a/ext/pathname/lib/pathname.rb +++ b/ext/pathname/lib/pathname.rb @@ -564,6 +564,8 @@ class Pathname # * FileUtils * FileUtils.mkpath(@path) nil end + alias :mkdir_p :mkpath + alias :makedirs :mkpath # Recursively deletes a directory, including all directories beneath it. # ~~~ -- https://bugs.ruby-lang.org/