End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Gem::Commands::WhichCommand#find_paths
find_paths(package_name, dirs)
lib/rubygems/commands/which_command.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.0.5/lib/rubygems/commands/which_command.rb, line 68
def find_paths(package_name, dirs)
result = []
dirs.each do |dir|
Gem.suffixes.each do |ext|
full_path = File.join dir, "#{package_name}#{ext}"
if File.exist? full_path and not File.directory? full_path
result << full_path
return result unless options[:show_all]
end
end
end
result
end
No documentation available