mirror of
https://github.com/ruby/ruby.git
synced 2025-08-25 05:55:46 +02:00
[ruby/pathname] require fileutils in both methods using it
rmtree is already requiring fileutils, but mkpath apparently relies on
autoload of FileUtils. Switch to require for both methods
07ad1fb41a
This commit is contained in:
parent
73fa322497
commit
1f1edeef3f
1 changed files with 1 additions and 2 deletions
|
@ -580,14 +580,13 @@ class Pathname # * Find *
|
|||
end
|
||||
|
||||
|
||||
autoload(:FileUtils, 'fileutils')
|
||||
|
||||
class Pathname # * FileUtils *
|
||||
# Creates a full path, including any intermediate directories that don't yet
|
||||
# exist.
|
||||
#
|
||||
# See FileUtils.mkpath and FileUtils.mkdir_p
|
||||
def mkpath(mode: nil)
|
||||
require 'fileutils'
|
||||
FileUtils.mkpath(@path, mode: mode)
|
||||
nil
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue