aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_tempfile.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_tempfile.rb')
-rw-r--r--test/test_tempfile.rb4
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