Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

only look at latest specs to suggest name

This reduced HTTP requests. Reviewed by @zenspider
  • Loading branch information...
commit 66783d84cc961fad3d368fc182c41dd4c8d6a37e 1 parent 1b92cc6
@tenderlove tenderlove authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/rubygems/spec_fetcher.rb
View
2  lib/rubygems/spec_fetcher.rb
@@ -186,7 +186,7 @@ def spec_for_dependency(dependency, matching_platform=true)
def suggest_gems_from_name gem_name
gem_name = gem_name.downcase.tr('_-', '')
max = gem_name.size / 2
- names = available_specs(:complete).first.values.flatten(1)
+ names = available_specs(:latest).first.values.flatten(1)
matches = names.map { |n|
next unless n.match_platform?
Please sign in to comment.
Something went wrong with that request. Please try again.