class Gem::Commands::ContentsCommand

def spec_for name

def spec_for name
  spec = Gem::Specification.find_all_by_name(name, @version).last
  return spec if spec
  say "Unable to find gem '#{name}' in #{@path_kind}"
  if Gem.configuration.verbose then
    say "\nDirectories searched:"
    @spec_dirs.sort.each { |dir| say dir }
  end
  return nil
end