diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-09-09 22:29:16 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-09-09 22:29:16 +0000 |
commit | 9e39c618da89cda4819b62f14f82348372f32d63 (patch) | |
tree | e6c9d336bebae6dbad075ed191d641c9999e361e /test/test_tempfile.rb | |
parent | e7ab96f6ede27a19ef8317a1062f70f691122a07 (diff) |
* ext/etc/etc.c (etc_systmpdir): assume system default tmpdir
safe. [ruby-dev:42089]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29209 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/test_tempfile.rb')
-rw-r--r-- | test/test_tempfile.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/test_tempfile.rb b/test/test_tempfile.rb index b0c0703a6a..1055bd45d8 100644 --- a/test/test_tempfile.rb +++ b/test/test_tempfile.rb @@ -30,6 +30,10 @@ class TestTempfile < Test::Unit::TestCase def test_saves_in_dir_tmpdir_by_default t = tempfile("foo") assert_equal Dir.tmpdir, File.dirname(t.path) + bug3733 = '[ruby-dev:42089]' + assert_nothing_raised(SecurityError, bug3733) { + proc {$SAFE = 1; File.expand_path(Dir.tmpdir)}.call + } end def test_saves_in_given_directory |