Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →
class method
Gem.read_binary
read_binary(path)
lib/rubygems.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.3.0/lib/rubygems.rb, line 755
def self.read_binary(path)
open_file(path, "rb+", &:read)
rescue Errno::EACCES, Errno::EROFS
open_file(path, "rb", &:read)
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.2 · 3.1 · 3.0