[前][次][番号順一覧][スレッド一覧]

ruby-changes:73529

From: David <ko1@a...>
Date: Mon, 12 Sep 2022 22:13:43 +0900 (JST)
Subject: [ruby-changes:73529] 8d2bcc88ff (master): [rubygems/rubygems] This sorting seems unnecessary too

https://git.ruby-lang.org/ruby.git/commit/?id=8d2bcc88ff

From 8d2bcc88ffe603290099d626cab40afcc834a12f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Rodr=C3=ADguez?= <deivid.rodriguez@r...>
Date: Wed, 24 Aug 2022 08:51:47 +0200
Subject: [rubygems/rubygems] This sorting seems unnecessary too

https://github.com/rubygems/rubygems/commit/823cb1fef9
---
 lib/bundler/dsl.rb   | 1 -
 lib/bundler/index.rb | 6 +-----
 2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/lib/bundler/dsl.rb b/lib/bundler/dsl.rb
index 385fdd4383..547db16190 100644
--- a/lib/bundler/dsl.rb
+++ b/lib/bundler/dsl.rb
@@ -67,7 +67,6 @@ module Bundler https://github.com/ruby/ruby/blob/trunk/lib/bundler/dsl.rb#L67
 
       gemspecs = Gem::Util.glob_files_in_dir("{,*}.gemspec", expanded_path).map {|g| Bundler.load_gemspec(g) }.compact
       gemspecs.reject! {|s| s.name != name } if name
-      Index.sort_specs(gemspecs)
       specs_by_name_and_version = gemspecs.group_by {|s| [s.name, s.version] }
 
       case specs_by_name_and_version.size
diff --git a/lib/bundler/index.rb b/lib/bundler/index.rb
index 00c7a9e00d..c639936cb0 100644
--- a/lib/bundler/index.rb
+++ b/lib/bundler/index.rb
@@ -78,17 +78,13 @@ module Bundler https://github.com/ruby/ruby/blob/trunk/lib/bundler/index.rb#L78
     end
     protected :unsorted_search
 
-    def self.sort_specs(specs)
+    def 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)
       case query
       when Gem::Specification, RemoteSpecification, LazySpecification, EndpointSpecification then search_by_spec(query)
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]