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:
parent
fb2be0b530
commit
b65a43ca2f
1 changed files with 1 additions and 7 deletions
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue