summaryrefslogtreecommitdiffstats
path: root/lib/tempfile.rb
diff options
context:
space:
mode:
authoreban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-07-23 16:37:35 +0000
committereban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-07-23 16:37:35 +0000
commit9c6cb448b6faee085ffd4133718c651c2c9de85d (patch)
treecc4e482833c937fb79e2ec09690f04ed2992fe7a /lib/tempfile.rb
parent2b5c2408119eb7b4605b3bbe4b32d2275afdb867 (diff)
downloadruby-9c6cb448b6faee085ffd4133718c651c2c9de85d.tar.gz
ruby-9c6cb448b6faee085ffd4133718c651c2c9de85d.tar.xz
ruby-9c6cb448b6faee085ffd4133718c651c2c9de85d.zip
* lib/tmpdir.rb (tmpdir): new method. remove TMPDIR.
use GetSystemWindowsDirectory(GetSystemDirectory), not GetTempPath. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/tempfile.rb')
-rw-r--r--lib/tempfile.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/tempfile.rb b/lib/tempfile.rb
index baaac8fc8..f5dc801b2 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