summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--lib/fileutils.rb4
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 10f711de39..7adf1f79d7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sun Jun 21 10:47:21 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * lib/fileutils.rb (FileUtils::Entry_#copy_file): open with
+ default umask. [ruby-core:23952]
+
Sun Jun 21 10:46:32 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* transcode.c (enc_arg): default interanl encoding may not be set.
diff --git a/lib/fileutils.rb b/lib/fileutils.rb
index 6124f29894..2a6b248585 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)