diff options
Diffstat (limited to 'lib/bundler/index.rb')
-rw-r--r-- | lib/bundler/index.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/bundler/index.rb b/lib/bundler/index.rb index f0ee411df8..4529c57279 100644 --- a/lib/bundler/index.rb +++ b/lib/bundler/index.rb @@ -67,12 +67,20 @@ module Bundler end end - results.sort_by do |s| + sort_specs(results) + end + + def self.sort_specs(specs) + specs.sort_by do |s| platform_string = s.platform.to_s [s.version, platform_string == RUBY ? NULL : platform_string] end end + def sort_specs(specs) + self.class.sort_specs(specs) + end + def local_search(query, base = nil) case query when Gem::Specification, RemoteSpecification, LazySpecification, EndpointSpecification then search_by_spec(query) |