summaryrefslogtreecommitdiff
path: root/lib/rubygems.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rubygems.rb')
-rw-r--r--lib/rubygems.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rubygems.rb b/lib/rubygems.rb
index 7dea86c3dd..5e106c7976 100644
--- a/lib/rubygems.rb
+++ b/lib/rubygems.rb
@@ -764,7 +764,7 @@ module Gem
# Safely read a file in binary mode on all platforms.
def self.read_binary(path)
- File.open path, binary_mode do |f|
+ open path, 'rb+' do |f|
f.flock(File::LOCK_EX)
f.read
end