End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
class method
Gem.read_binary
read_binary(path)
lib/rubygems.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.2.0/lib/rubygems.rb, line 761
def self.read_binary(path)
open_file(path, "rb+") do |io|
io.read
end
rescue Errno::EACCES, Errno::EROFS
open_file(path, "rb") do |io|
io.read
end
end
Safely read a file in binary mode on all platforms.
See also
.pre_uninstall
.refresh
.pre_reset
.register_default_spec
also in
4.1 · 4.0 · 3.4 · 3.3 · 3.1 · 3.0