diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-12-08 07:10:38 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-12-08 07:10:38 +0000 |
commit | 2322a131272f705139fb1e6bbcf1d85a0205e8b0 (patch) | |
tree | 955e671a4900baec8f68290207252f37d19d9a3d /lib/tempfile.rb | |
parent | a721bd628ef4ea9846e9395530752ab8e47b4eca (diff) | |
download | ruby-2322a131272f705139fb1e6bbcf1d85a0205e8b0.tar.gz |
matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/tempfile.rb')
-rw-r--r-- | lib/tempfile.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/tempfile.rb b/lib/tempfile.rb index 10f05a3b2b..ab97f457a8 100644 --- a/lib/tempfile.rb +++ b/lib/tempfile.rb @@ -29,6 +29,9 @@ class Tempfile < SimpleDelegator end def initialize(basename, tmpdir=ENV['TMPDIR']||ENV['TMP']||ENV['TEMP']||'/tmp') + if $SAFE > 0 and tmpdir.tainted? + tmpdir = '/tmp' + end umask = File.umask(0177) begin n = 0 |