summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtool/rbinstall.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb
index 0b26ba3f00b..9f423253642 100755
--- a/tool/rbinstall.rb
+++ b/tool/rbinstall.rb
@@ -845,7 +845,14 @@ install?(:ext, :comm, :gem, :'bundle-gems') do
inst = Gem::Installer.new(gem, options)
inst.spec.extension_dir = with_destdir(inst.spec.extension_dir)
begin
- Gem::DefaultUserInteraction.use_ui(silent) {inst.install}
+ Gem::DefaultUserInteraction.use_ui(silent) do
+ begin
+ File.umask(022)
+ inst.install
+ ensure
+ File.umask(0222)
+ end
+ end
rescue Gem::InstallError => e
next
end