summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-06-21 01:47:25 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-06-21 01:47:25 +0000
commite82010d36fbc692d1159fd8471027ee3ddb35814 (patch)
treec09b1c77085bdd13b05b8439e879cf0c3fadfa9b /lib
parent47ba3813f36c3a986f8031d9f1b8a8971aad8b7b (diff)
downloadruby-e82010d36fbc692d1159fd8471027ee3ddb35814.tar.gz
ruby-e82010d36fbc692d1159fd8471027ee3ddb35814.tar.xz
ruby-e82010d36fbc692d1159fd8471027ee3ddb35814.zip
* lib/fileutils.rb (FileUtils::Entry_#copy_file): open with
default umask. [ruby-core:23952] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/fileutils.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/fileutils.rb b/lib/fileutils.rb
index 6124f2989..2a6b24858 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)