Pull initialization code out of begin block
This commit is contained in:
parent
b34fa6cfd8
commit
0578f1ff5a
@ -106,6 +106,7 @@ class Pathname
|
||||
def atomic_write content
|
||||
require "tempfile"
|
||||
tf = Tempfile.new(basename.to_s, dirname)
|
||||
begin
|
||||
tf.binmode
|
||||
tf.write(content)
|
||||
|
||||
@ -128,6 +129,7 @@ class Pathname
|
||||
ensure
|
||||
tf.close!
|
||||
end
|
||||
end
|
||||
|
||||
def default_stat
|
||||
sentinel = parent.join(".brew.#{Process.pid}.#{rand(Time.now.to_i)}")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user