diff --git a/lib/pathname.rb b/lib/pathname.rb index 8eeba6a..dc63917 100644 --- a/lib/pathname.rb +++ b/lib/pathname.rb @@ -580,14 +580,13 @@ def find(ignore_error: true) # :yield: pathname 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