diff options
author | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-06-13 02:01:42 +0000 |
---|---|---|
committer | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-06-13 02:01:42 +0000 |
commit | c8151d123506d34384d8a7cd856ec43b14a3dd5a (patch) | |
tree | 4c5cccf6a747cece29b152ef00e0a30775a57066 /bootstraptest/test_method.rb | |
parent | 23ab11f14af70ce9546836daee9e48e561fde742 (diff) |
* bootstraptest/test_autoload.rb, bootstraptest/test_method.rb:
remove tests for $SAFE=4.
* lib/pp.rb: use taint instead of untrust to avoid warnings when
$VERBOSE is set to true.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41269 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bootstraptest/test_method.rb')
-rw-r--r-- | bootstraptest/test_method.rb | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/bootstraptest/test_method.rb b/bootstraptest/test_method.rb index ed22608aea..4282bc6273 100644 --- a/bootstraptest/test_method.rb +++ b/bootstraptest/test_method.rb @@ -886,50 +886,6 @@ class C0; def m *args; [:C0_m, args]; end; end class C1 < C0; def m a, o=:o; super; end; end ; C1.new.m 1, 2} -assert_equal %q{[:ok, :ok, :ok, :ok, :ok, :ok, :ng, :ng]}, %q{ - $ans = [] - class Foo - def m - end - end - - c1 = c2 = nil - - lambda{ - $SAFE = 4 - c1 = Class.new{ - def m - end - } - c2 = Class.new(Foo){ - alias mm m - } - }.call - - def test - begin - yield - rescue SecurityError - $ans << :ok - else - $ans << :ng - end - end - - o1 = c1.new - o2 = c2.new - - test{o1.m} - test{o2.mm} - test{o1.send :m} - test{o2.send :mm} - test{o1.public_send :m} - test{o2.public_send :mm} - test{o1.method(:m).call} - test{o2.method(:mm).call} - $ans -} - assert_equal 'ok', %q{ class C def x=(n) |