diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2021-04-15 12:47:18 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2021-04-15 15:36:15 +0900 |
commit | 96741765d880b700933526a97a67345dfcd90c47 (patch) | |
tree | 565766c43e97b7deb93f2390af955465a85ee668 /lib/rubygems.rb | |
parent | ed149dbf46d1a8b16e6de9c3dbbcc10f72c9c019 (diff) | |
download | ruby-96741765d880b700933526a97a67345dfcd90c47.tar.gz |
Merge the master branch of RubyGems
Diffstat (limited to 'lib/rubygems.rb')
-rw-r--r-- | lib/rubygems.rb | 4 |
1 files changed, 2 insertions, 2 deletions
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 |