1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

fileutils.rb: fix rename_cannot_overwrite_file

* lib/fileutils.rb (rename_cannot_overwrite_file): File.rename on
  cygwin and mswin/mingw can overwrite the destination file.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51696 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2015-08-26 16:05:39 +00:00
parent 88872832f0
commit 74842faf64

View file

@ -547,7 +547,7 @@ module FileUtils
OPT_TABLE['move'] = [:force, :noop, :verbose, :secure]
def rename_cannot_overwrite_file? #:nodoc:
/cygwin|mswin|mingw|bccwin|emx/ =~ RUBY_PLATFORM
/emx/ =~ RUBY_PLATFORM
end
private_module_function :rename_cannot_overwrite_file?