Skip to content
Permalink
Browse files

Simplify home directory detection and platform condition.

  • Loading branch information...
hsbt committed Mar 3, 2018
1 parent 3bc301b commit 47c9f378687a6f806561a14dd50eae8eb4652882
Showing with 2 additions and 4 deletions.
  1. +2 −4 lib/rubygems.rb
@@ -577,11 +577,9 @@ def self.find_latest_files(glob, check_load_path=true)
#++

def self.find_home
windows = File::ALT_SEPARATOR

File.expand_path "~"
Dir.home
rescue
if windows then
if Gem.win_platform? then
File.expand_path File.join(ENV['HOMEDRIVE'] || ENV['SystemDrive'], '/')
else
File.expand_path "/"

0 comments on commit 47c9f37

Please sign in to comment.
You can’t perform that action at this time.