End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
class method
Gem.use_paths
use_paths(home, *paths)
lib/rubygems.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.1.3/lib/rubygems.rb, line 982
def self.use_paths(home, *paths)
paths.flatten!
paths.compact!
hash = { "GEM_HOME" => home, "GEM_PATH" => paths.empty? ? home : paths.join(File::PATH_SEPARATOR) }
hash.delete_if {|_, v| v.nil? }
self.paths = hash
end