Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
class method
Gem.find_home
find_home
lib/rubygems/defaults.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/lib/rubygems/defaults.rb, line 81
def self.find_home
Dir.home.dup
rescue StandardError
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_default_spec
.find_spec_for_exe
also in
4.0 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0