From a607c82efe3be64a1822ca70ebdcb45cfd5000d2 Mon Sep 17 00:00:00 2001 From: matz Date: Thu, 30 Oct 2003 09:36:41 +0000 Subject: * io.c (READ_DATA_BUFFERED): new macro to detect whether stdio buffer filled. * io.c (rb_io_fptr_cleanup): move path deallocation to rb_io_fptr_finalize (finalizer called by GC). git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/fileutils.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/fileutils.rb b/lib/fileutils.rb index dfec5f900..e65033f9b 100644 --- a/lib/fileutils.rb +++ b/lib/fileutils.rb @@ -399,9 +399,10 @@ module FileUtils # def copy_file( src, dest ) File.open(src, 'rb') {|r| - File.open(dest, 'wb') {|w| + File.open(dest, 'wb') {|w| copy_stream r, w - } } + } + } end # -- cgit