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

ruby-changes:60193

From: V=C3=ADt <ko1@a...>
Date: Wed, 26 Feb 2020 11:05:12 +0900 (JST)
Subject: [ruby-changes:60193] 6609940a5e (master): Use `$script_mode` instead of `$prog_mode` for gem inistallation.

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

From 6609940a5e5c46dcc96d2bd3c228a951df6240ce Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@r...>
Date: Tue, 1 Oct 2019 12:25:07 +0200
Subject: Use `$script_mode` instead of `$prog_mode` for gem inistallation.

rbinstall is using `$script_mode` and `$prog_mode`. However, the
`$script_mode` fallbacks to `$prog_mode` if not provided.

However, RubyGems do not distinguish between `$script_mode` and
`$prog_mode`:

https://github.com/rubygems/rubygems/blame/92892bbc3adba86a90756c385433835f6761b8da/lib/rubygems/installer.rb#L196
https://github.com/rubygems/rubygems/blame/92892bbc3adba86a90756c385433835f6761b8da/lib/rubygems/installer.rb#L515
https://github.com/rubygems/rubygems/blame/92892bbc3adba86a90756c385433835f6761b8da/lib/rubygems/installer.rb#L543

Comparing the usage of `$script_mode` and `$prog_mode`, it seems that
the `$script_mode` should be used where RubyGems expects `$prog_mode`.

diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb
index 7fc0109..fbf818f 100755
--- a/tool/rbinstall.rb
+++ b/tool/rbinstall.rb
@@ -877,7 +877,7 @@ install?(:ext, :comm, :gem, :'bundled-gems') do https://github.com/ruby/ruby/blob/trunk/tool/rbinstall.rb#L877
     :ignore_dependencies => true,
     :dir_mode => $dir_mode,
     :data_mode => $data_mode,
-    :prog_mode => $prog_mode,
+    :prog_mode => $script_mode,
     :wrappers => true,
     :format_executable => true,
   }
-- 
cgit v0.10.2


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

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