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

ruby-changes:61114

From: David <ko1@a...>
Date: Fri, 8 May 2020 14:14:34 +0900 (JST)
Subject: [ruby-changes:61114] 8250000187 (master): [rubygems/rubygems] Extract logic to a local variable for later reuse

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

From 8250000187726b161e7491be6653dafeebad59b2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Rodr=C3=ADguez?= <deivid.rodriguez@r...>
Date: Sun, 29 Mar 2020 21:22:34 +0200
Subject: [rubygems/rubygems] Extract logic to a local variable for later reuse

https://github.com/rubygems/rubygems/commit/dc715888d4

diff --git a/lib/rubygems.rb b/lib/rubygems.rb
index dc26ea8..2703525 100644
--- a/lib/rubygems.rb
+++ b/lib/rubygems.rb
@@ -1216,10 +1216,11 @@ An Array (#{env.inspect}) was passed in from #{caller[3]} https://github.com/ruby/ruby/blob/trunk/lib/rubygems.rb#L1216
     #
 
     def register_default_spec(spec)
+      extended_require_paths = spec.require_paths.map {|f| f + "/"}
       new_format = spec.require_paths.any? {|path| spec.files.any? {|f| f.start_with? path } }
 
       if new_format
-        prefix_group = spec.require_paths.map {|f| f + "/"}.join("|")
+        prefix_group = extended_require_paths.join("|")
         prefix_pattern = /^(#{prefix_group})/
       end
 
-- 
cgit v0.10.2


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

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