From 96741765d880b700933526a97a67345dfcd90c47 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Thu, 15 Apr 2021 12:47:18 +0900 Subject: Merge the master branch of RubyGems --- lib/rubygems.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/rubygems.rb') diff --git a/lib/rubygems.rb b/lib/rubygems.rb index 3c85284ff2..76d86ee6c9 100644 --- a/lib/rubygems.rb +++ b/lib/rubygems.rb @@ -813,7 +813,7 @@ An Array (#{env.inspect}) was passed in from #{caller[3]} ## # Safely write a file in binary mode on all platforms. def self.write_binary(path, data) - open(path, 'wb') do |io| + File.open(path, 'wb') do |io| begin io.flock(File::LOCK_EX) rescue *WRITE_BINARY_ERRORS @@ -824,7 +824,7 @@ An Array (#{env.inspect}) was passed in from #{caller[3]} if Thread.main != Thread.current raise else - open(path, 'wb') do |io| + File.open(path, 'wb') do |io| io.write data end end -- cgit v1.2.3