instance method
Gem::PathSupport#split_gem_path
split_gem_path(gpaths, home)
lib/rubygems/path_support.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.0.0/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 /#{Gem.path_separator}\z/.match?(gpaths)
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
Split the Gem search path (as reported by Gem.path).