ruby-changes:12959
From: nobu <ko1@a...>
Date: Sat, 29 Aug 2009 12:17:15 +0900 (JST)
Subject: [ruby-changes:12959] Ruby:r24701 (trunk): * lib/tmpdir.rb (Dir.mktmpdir): rolled back r24699.
nobu 2009-08-29 12:16:56 +0900 (Sat, 29 Aug 2009) New Revision: 24701 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=24701 Log: * lib/tmpdir.rb (Dir.mktmpdir): rolled back r24699. [ruby-dev:39193] Modified files: trunk/ChangeLog trunk/lib/tmpdir.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 24700) +++ ChangeLog (revision 24701) @@ -1,3 +1,7 @@ +Sat Aug 29 12:16:47 2009 Nobuyoshi Nakada <nobu@r...> + + * lib/tmpdir.rb (Dir.mktmpdir): rolled back r24699. [ruby-dev:39193] + Sat Aug 29 03:27:17 2009 Nobuyoshi Nakada <nobu@r...> * lib/tempfile.rb (Tempfile#make_tmpname): removed thread race Index: lib/tmpdir.rb =================================================================== --- lib/tmpdir.rb (revision 24700) +++ lib/tmpdir.rb (revision 24701) @@ -111,10 +111,9 @@ 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) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/