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

ruby-changes:37152

From: nobu <ko1@a...>
Date: Tue, 13 Jan 2015 17:22:14 +0900 (JST)
Subject: [ruby-changes:37152] nobu:r49233 (trunk): rbinstall.rb: reuse options hash

nobu	2015-01-13 17:21:51 +0900 (Tue, 13 Jan 2015)

  New Revision: 49233

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=49233

  Log:
    rbinstall.rb: reuse options hash
    
    * tool/rbinstall.rb (gem): reuse options hash, which is invariant
      for all gems.

  Modified files:
    trunk/tool/rbinstall.rb
Index: tool/rbinstall.rb
===================================================================
--- tool/rbinstall.rb	(revision 49232)
+++ tool/rbinstall.rb	(revision 49233)
@@ -715,8 +715,16 @@ install?(:ext, :comm, :gem) do https://github.com/ruby/ruby/blob/trunk/tool/rbinstall.rb#L715
     gem_dir = Gem.default_dir
     directories = Gem.ensure_gem_subdirectories(gem_dir, :mode => $dir_mode)
     prepare "bundle gems", gem_dir, directories
+    options = {
+      :install_dir => with_destdir(gem_dir),
+      :domain => :local,
+      :ignore_dependencies => true,
+      :dir_mode => $dir_mode,
+      :data_mode => $data_mode,
+      :prog_mode => $prog_mode,
+    }
     Dir.glob(srcdir+'/gems/*.gem').each do |gem|
-      Gem.install gem, Gem::Requirement.default, :install_dir => with_destdir(gem_dir), :domain => :local, :ignore_dependencies => true
+      Gem.install(gem, Gem::Requirement.default, options)
       gemname = Pathname(gem).basename
       puts "#{" "*30}#{gemname}"
     end

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

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