Project

General

Profile

Actions

Feature #10381

closed

Pathname#mkdir_p, Pathname#makedirs が欲しい

Added by takkanm (三村 益隆) over 9 years ago. Updated over 9 years ago.

Status:
Feedback
Target version:
-
[ruby-dev:48625]

Description

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.
   #
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0