End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
class method
Gem.find_home
find_home
lib/rubygems/defaults.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.0.5/lib/rubygems/defaults.rb, line 94
def self.find_home
Dir.home.dup
rescue
if Gem.win_platform?
File.expand_path File.join(ENV['HOMEDRIVE'] || ENV['SystemDrive'], '/')
else
File.expand_path "/"
end
end
Finds the user’s home directory.
See also
.find_files
.find_latest_files
.find_config_file
.find_spec_for_exe
also in
4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.1