[ruby/fileutils] A workaround for RBS

fde0f0713a
This commit is contained in:
Nobuyoshi Nakada 2025-07-19 23:41:29 +09:00 committed by git
parent 5a8e87cb2e
commit a116871258

View file

@ -2473,6 +2473,7 @@ module FileUtils
def fu_each_src_dest0(src, dest, target_directory = true) #:nodoc:
if tmp = Array.try_convert(src)
unless target_directory or tmp.size <= 1
tmp = tmp.map {|f| File.path(f)} # A workaround for RBS
raise ArgumentError, "extra target #{tmp}"
end
tmp.each do |s|