1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/tmpdir.rb: new library to get temporary directory path,

using GetTempPath on Win32 environment.

* lib/tempfile.rb: now uses tmpdir.rb.

* lib/cgi/session.rb, ib/drb/unix.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2003-07-21 15:34:18 +00:00
parent 15c3df744f
commit 2416271405
6 changed files with 45 additions and 8 deletions

View file

@ -1,5 +1,6 @@
require 'socket'
require 'drb/drb'
require 'tmpdir'
module DRb
@ -52,8 +53,7 @@ module DRb
Max_try = 10
private
def self.temp_server
tmpdir = ENV['TMPDIR'] || ENV['TMP'] || ENV['TEMP'] || '/tmp'
tmpdir = '/tmp' if $SAFE > 0 and tmpdir.tainted?
tmpdir = Dir::TMPDIR
n = 0
while true
begin