mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Create MJIT header with strict permission
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
5164e2e43a
commit
002e0ca428
1 changed files with 4 additions and 2 deletions
|
@ -148,8 +148,10 @@ module MJITHeader
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.write(code, out)
|
def self.write(code, out)
|
||||||
FileUtils.mkdir_p(File.dirname(out))
|
# create with strict permission, then will install proper
|
||||||
File.binwrite("#{out}.new", code)
|
# permmsion
|
||||||
|
FileUtils.mkdir_p(File.dirname(out), mode: 0700)
|
||||||
|
File.binwrite("#{out}.new", code, perm: 0600)
|
||||||
FileUtils.mv("#{out}.new", out)
|
FileUtils.mv("#{out}.new", out)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue