1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Cherry-picked spec/mspec/lib/mspec/helpers/fs.rb

From 316f60e3be

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66147 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2018-12-03 03:15:42 +00:00
parent fb2be0b530
commit b65a43ca2f

View file

@ -1,12 +1,6 @@
# Copies a file
def cp(source, dest)
File.open(dest, "wb") do |d|
File.open(source, "rb") do |s|
while data = s.read(1024)
d.write data
end
end
end
IO.copy_stream source, dest
end
# Creates each directory in path that does not exist.