[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 https://github.com/ruby/pathname/commit/07ad1fb41a
This commit is contained in:
parent
73fa322497
commit
1f1edeef3f
@ -580,14 +580,13 @@ class Pathname # * Find *
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
autoload(:FileUtils, 'fileutils')
|
|
||||||
|
|
||||||
class Pathname # * FileUtils *
|
class Pathname # * FileUtils *
|
||||||
# Creates a full path, including any intermediate directories that don't yet
|
# Creates a full path, including any intermediate directories that don't yet
|
||||||
# exist.
|
# exist.
|
||||||
#
|
#
|
||||||
# See FileUtils.mkpath and FileUtils.mkdir_p
|
# See FileUtils.mkpath and FileUtils.mkdir_p
|
||||||
def mkpath(mode: nil)
|
def mkpath(mode: nil)
|
||||||
|
require 'fileutils'
|
||||||
FileUtils.mkpath(@path, mode: mode)
|
FileUtils.mkpath(@path, mode: mode)
|
||||||
nil
|
nil
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user