Skip to content

Commit 0405d6f

Browse files
authored
Merge pull request #138 from nobu/rbs-workaround
A workaround for RBS
2 parents 4871815 + c3abf39 commit 0405d6f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/fileutils.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1487,7 +1487,7 @@ def remove_file(path, force = false)
14871487
# Related: {methods for deleting}[rdoc-ref:FileUtils@Deleting].
14881488
#
14891489
def remove_dir(path, force = false)
1490-
raise Errno::ENOTDIR, path unless File.directory?(path)
1490+
raise Errno::ENOTDIR, path unless force or File.directory?(path)
14911491
remove_entry path, force
14921492
end
14931493
module_function :remove_dir
@@ -2473,6 +2473,7 @@ def fu_each_src_dest(src, dest) #:nodoc:
24732473
def fu_each_src_dest0(src, dest, target_directory = true) #:nodoc:
24742474
if tmp = Array.try_convert(src)
24752475
unless target_directory or tmp.size <= 1
2476+
tmp = tmp.map {|f| File.path(f)} # A workaround for RBS
24762477
raise ArgumentError, "extra target #{tmp}"
24772478
end
24782479
tmp.each do |s|

0 commit comments

Comments
 (0)