diff options
author | eban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-07-23 16:37:35 +0000 |
---|---|---|
committer | eban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-07-23 16:37:35 +0000 |
commit | 02f036ddbcb3409092e397b2df247bd9447e8b3f (patch) | |
tree | cc4e482833c937fb79e2ec09690f04ed2992fe7a /lib/tempfile.rb | |
parent | 231247c010acba191b78ed2d1310c935e63ad919 (diff) |
* lib/tmpdir.rb (tmpdir): new method. remove TMPDIR.
use GetSystemWindowsDirectory(GetSystemDirectory), not GetTempPath.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/tempfile.rb')
-rw-r--r-- | lib/tempfile.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/tempfile.rb b/lib/tempfile.rb index baaac8fc88..f5dc801b21 100644 --- a/lib/tempfile.rb +++ b/lib/tempfile.rb @@ -18,10 +18,10 @@ class Tempfile < SimpleDelegator # object works just like a File object. # # If tmpdir is omitted, the temporary directory is determined by - # Dir::TMPDIR provided by 'tmpdir.rb'. + # Dir::tmpdir provided by 'tmpdir.rb'. # When $SAFE > 0 and the given tmpdir is tainted, it uses # /tmp. (Note that ENV values are tainted by default) - def initialize(basename, tmpdir=Dir::TMPDIR) + def initialize(basename, tmpdir=Dir::tmpdir) if $SAFE > 0 and tmpdir.tainted? tmpdir = '/tmp' end |