diff --git a/ChangeLog b/ChangeLog index 6d42aa094c..2b838883a7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Sat Aug 29 12:16:47 2009 Nobuyoshi Nakada + + * lib/tmpdir.rb (Dir.mktmpdir): rolled back r24699. [ruby-dev:39193] + Sat Aug 29 03:27:17 2009 Nobuyoshi Nakada * lib/tempfile.rb (Tempfile#make_tmpname): removed thread race diff --git a/lib/tmpdir.rb b/lib/tmpdir.rb index 1b137eeae3..0d247bdd54 100644 --- a/lib/tmpdir.rb +++ b/lib/tmpdir.rb @@ -111,10 +111,9 @@ class Dir end tmpdir ||= Dir.tmpdir t = Time.now.strftime("%Y%m%d") - th = Thread.current.object_id.to_s(36) n = nil begin - path = "#{tmpdir}/#{prefix}#{t}-#{$$}-#{th}-#{rand(0x100000000).to_s(36)}" + path = "#{tmpdir}/#{prefix}#{t}-#{$$}-#{rand(0x100000000).to_s(36)}" path << "-#{n}" if n path << suffix Dir.mkdir(path, 0700)