End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Gem::PathSupport#split_gem_path
split_gem_path(gpaths, home)
lib/rubygems/path_support.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.1.3/lib/rubygems/path_support.rb, line 46
def split_gem_path(gpaths, home)
# FIX: it should be [home, *path], not [*path, home]
gem_path = []
if gpaths
gem_path = gpaths.split(Gem.path_separator)
# Handle the path_separator being set to a regexp, which will cause
# end_with? to error
if gpaths =~ /#{Gem.path_separator}\z/
gem_path += default_path
end
if File::ALT_SEPARATOR
gem_path.map! do |this_path|
this_path.gsub File::ALT_SEPARATOR, File::SEPARATOR
end
end
gem_path << home
else
gem_path = default_path
end
gem_path.map {|path| expand(path) }.uniq
end