summaryrefslogtreecommitdiff
path: root/lib/rubygems.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rubygems.rb')
-rw-r--r--lib/rubygems.rb4
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