Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
Gem::Commands::ContentsCommand#spec_for
spec_for(name)
lib/rubygems/commands/contents_command.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/lib/rubygems/commands/contents_command.rb, line 184
def spec_for(name)
spec = Gem::Specification.find_all_by_name(name, @version).first
return spec if spec
say "Unable to find gem '#{name}' in #{@path_kind}"
if Gem.configuration.verbose
say "\nDirectories searched:"
@spec_dirs.sort.each {|dir| say dir }
end
nil
end
No documentation available