summaryrefslogtreecommitdiffstats
path: root/test/ruby/test_rubyoptions.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-10-30 23:16:16 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-10-30 23:16:16 +0000
commit6150ae9466f6eb8785a0a218453d291df27cd168 (patch)
treefcba3c47aee0cee80a97c3888040d9581a892947 /test/ruby/test_rubyoptions.rb
parenta6774a0c045da4fd2c1441444873d4f7dc5c8d58 (diff)
downloadruby-6150ae9466f6eb8785a0a218453d291df27cd168.tar.gz
ruby-6150ae9466f6eb8785a0a218453d291df27cd168.tar.xz
ruby-6150ae9466f6eb8785a0a218453d291df27cd168.zip
* ruby.c (process_options): delays setting safe level.
[ruby-dev:36997] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20067 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_rubyoptions.rb')
-rw-r--r--test/ruby/test_rubyoptions.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb
index ebe6023b0..c55c99d0d 100644
--- a/test/ruby/test_rubyoptions.rb
+++ b/test/ruby/test_rubyoptions.rb
@@ -199,12 +199,16 @@ class TestRubyOptions < Test::Unit::TestCase
ENV['RUBYOPT'] = ' - -'
assert_in_out_err([], "", [], [])
+ assert_in_out_err(['-e', 'p $:.include?(".")'], "", ["true"], [])
+
ENV['RUBYOPT'] = '-e "p 1"'
assert_in_out_err([], "", [], /invalid switch in RUBYOPT: -e \(RuntimeError\)/)
ENV['RUBYOPT'] = '-T1'
assert_in_out_err([], "", [], /no program input from stdin allowed in tainted mode \(SecurityError\)/)
+ assert_in_out_err(['-e', 'p $:.include?(".")'], "", ["false"], [])
+
ENV['RUBYOPT'] = '-T4'
assert_in_out_err([], "", [], /no program input from stdin allowed in tainted mode \(SecurityError\)/)