rails/rails — pull request #16245 by byroot (2014-07-21 20:50:43+00:00)
Title: File renaming should be the last operation of an atomic write

That way there is just no possible race conditions.

cc @wisq