From 18e641dc13a169c4dcc0ca9dbed9f46cb9f248fc Mon Sep 17 00:00:00 2001 From: nagachika Date: Mon, 27 Mar 2017 15:18:38 +0000 Subject: merge revision(s) 57546: [Backport #13194] rbinstall.rb: Gem::Installer lacks dir_mode option * tool/rbinstall.rb (bundle-gems): Gem::Installer does not support directory permission option, set umask to owner writable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58159 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- tool/rbinstall.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'tool') diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb index 2edf31d0ff..9a5efcb538 100755 --- a/tool/rbinstall.rb +++ b/tool/rbinstall.rb @@ -763,7 +763,12 @@ install?(:ext, :comm, :gem) do if defined?(Zlib) Gem.instance_variable_set(:@ruby, with_destdir(File.join(bindir, ruby_install_name))) gems.each do |gem| - Gem.install(gem, Gem::Requirement.default, options) + begin + File.umask(022) + Gem.install(gem, Gem::Requirement.default, options) + ensure + File.umask(0222) + end gemname = File.basename(gem) puts "#{" "*30}#{gemname}" end -- cgit v1.2.3