summaryrefslogtreecommitdiffstats
path: root/lib/fileutils.rb
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-06-21 10:36:55 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-06-21 10:36:55 +0000
commit84d80f3b0bb143e243453482d36ef244352e064b (patch)
tree66283630c9d0b00e4109a7c33bf576f871a30ee9 /lib/fileutils.rb
parentc87d6690b3c5dc254be7d4fb48ecbfd8a4acf210 (diff)
downloadruby-84d80f3b0bb143e243453482d36ef244352e064b.tar.gz
ruby-84d80f3b0bb143e243453482d36ef244352e064b.tar.xz
ruby-84d80f3b0bb143e243453482d36ef244352e064b.zip
merges r23774 from trunk into ruby_1_9_1.
-- * lib/fileutils.rb (FileUtils::Entry_#copy_file): open with default umask. [ruby-core:23952] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@23808 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/fileutils.rb')
-rw-r--r--lib/fileutils.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/fileutils.rb b/lib/fileutils.rb
index b1e20f64e..0a3fdc41d 100644
--- a/lib/fileutils.rb
+++ b/lib/fileutils.rb
@@ -1261,7 +1261,9 @@ module FileUtils
end
def copy_file(dest)
- IO.copy_stream(path(), dest)
+ File.open(dest, 'wb') do |f|
+ IO.copy_stream(path(), f)
+ end
end
def copy_metadata(path)