diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-06-26 12:48:15 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-06-26 12:48:15 +0000 |
commit | cadee06b2a09c309b0fb944251a8105b449d7dd1 (patch) | |
tree | 96d3d96d4a6b3e133e62b39918d320d9137f1514 /test/ruby/test_require.rb | |
parent | 2f262b2351aa5acaa072a1d288c54545bfa7c924 (diff) | |
download | ruby-cadee06b2a09c309b0fb944251a8105b449d7dd1.tar.gz |
* test/ruby/test_rubyoptions.rb (TestRubyOptions#test_rubyopt):
test suite add '.' to RUBYLIB. remove checks.
* test/ruby/test_require.rb (TestRequire#test_tainted_loadpath):
the default tempdir directory /tmp is world writable, so
SecrurityError would be raised. check removed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_require.rb')
-rw-r--r-- | test/ruby/test_require.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/ruby/test_require.rb b/test/ruby/test_require.rb index 4bc44eff04..a1726bf63b 100644 --- a/test/ruby/test_require.rb +++ b/test/ruby/test_require.rb @@ -230,8 +230,11 @@ class TestRequire < Test::Unit::TestCase abs_dir = "#{ abs_dir }" $: << abs_dir.taint $SAFE = 1 - require "#{ t.path }" - p :ok + begin + require "#{ file }" + rescue SecurityError + p :ok + end INPUT assert_in_out_err([], <<-INPUT, %w(:ok), []) |