mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 08:33:58 +02:00
[rubygems/rubygems] Protect binstub access during creation with a flock
88e3f1d23c
This commit is contained in:
parent
091a6ea8c1
commit
5c826ebea5
2 changed files with 20 additions and 17 deletions
|
@ -222,7 +222,7 @@ class Gem::Installer
|
|||
ruby_executable = false
|
||||
existing = nil
|
||||
|
||||
File.open generated_bin, "rb" do |io|
|
||||
Gem.open_file_with_flock generated_bin, "rb+" do |io|
|
||||
line = io.gets
|
||||
shebang = /^#!.*ruby/o
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue