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

ruby-changes:61148

From: David <ko1@a...>
Date: Fri, 8 May 2020 14:15:07 +0900 (JST)
Subject: [ruby-changes:61148] d2087f1cde (master): [rubygems/rubygems] Extract an `install_file_list` helper

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

From d2087f1cde7810c76f6eb94553a24f760636e72c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Rodr=C3=ADguez?= <deivid.rodriguez@r...>
Date: Mon, 27 Apr 2020 22:16:16 +0200
Subject: [rubygems/rubygems] Extract an `install_file_list` helper

https://github.com/rubygems/rubygems/commit/5106ea4582

diff --git a/lib/rubygems/commands/setup_command.rb b/lib/rubygems/commands/setup_command.rb
index dc7a73f..b330b8a 100644
--- a/lib/rubygems/commands/setup_command.rb
+++ b/lib/rubygems/commands/setup_command.rb
@@ -324,13 +324,9 @@ By default, this RubyGems will install gem as: https://github.com/ruby/ruby/blob/trunk/lib/rubygems/commands/setup_command.rb#L324
       pem_files = pem_files_in path
 
       Dir.chdir path do
-        lib_files.each do |lib_file|
-          install_file lib_file, lib_dir
-        end
+        install_file_list(lib_files, lib_dir)
 
-        pem_files.each do |pem_file|
-          install_file pem_file, lib_dir
-        end
+        install_file_list(pem_files, lib_dir)
       end
     end
   end
@@ -634,6 +630,12 @@ abort "#{deprecation_message}" https://github.com/ruby/ruby/blob/trunk/lib/rubygems/commands/setup_command.rb#L630
 
   private
 
+  def install_file_list(files, dest_dir)
+    files.each do |file|
+      install_file file, dest_dir
+    end
+  end
+
   def install_file(file, dest_dir)
     dest_file = File.join dest_dir, file
     dest_dir = File.dirname dest_file
-- 
cgit v0.10.2


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

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