summaryrefslogtreecommitdiff
path: root/mkconfig.rb
diff options
context:
space:
mode:
Diffstat (limited to 'mkconfig.rb')
-rw-r--r--mkconfig.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/mkconfig.rb b/mkconfig.rb
index 5eb0b18d1c..d558583b61 100644
--- a/mkconfig.rb
+++ b/mkconfig.rb
@@ -7,7 +7,8 @@ srcdir = $srcdir if $srcdir
File.makedirs(File.dirname(rbconfig_rb), true)
version = RUBY_VERSION
-config = open(rbconfig_rb, "w")
+rbconfig_rb_tmp = rbconfig_rb + '.tmp'
+config = open(rbconfig_rb_tmp, "w")
$stdout.reopen(config)
fast = {'prefix'=>TRUE, 'ruby_install_name'=>TRUE, 'INSTALL'=>TRUE, 'EXEEXT'=>TRUE}
@@ -111,5 +112,6 @@ print <<EOS
end
EOS
config.close
+File.rename(rbconfig_rb_tmp, rbconfig_rb)
# vi:set sw=2: