summaryrefslogtreecommitdiff
path: root/test/ruby/test_settracefunc.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-01-29 07:51:00 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-01-29 07:51:00 +0000
commit499ca89e24c47cfada7e493a7dfd81cdb9323a45 (patch)
treeb19a55192318638f6e1cabb8e7fb795dafd249d0 /test/ruby/test_settracefunc.rb
parente26c2bc21baac04ab52bff4eeedd9f41e4cb1f31 (diff)
vm_trace.c: TracePoint safe level check
* vm_trace.c (rb_tracepoint_enable, rb_tracepoint_disable): check safe level as well as set_trace_func. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38969 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_settracefunc.rb')
-rw-r--r--test/ruby/test_settracefunc.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/ruby/test_settracefunc.rb b/test/ruby/test_settracefunc.rb
index 264b805127d..e7c010aaaf9 100644
--- a/test/ruby/test_settracefunc.rb
+++ b/test/ruby/test_settracefunc.rb
@@ -919,4 +919,18 @@ class TestSetTraceFunc < Test::Unit::TestCase
assert_equal([:b_call, :b_return], ary, bug_7668)
end
end
+
+ def test_trace_point_enable_safe4
+ tp = TracePoint.new {}
+ assert_security_error_safe4 do
+ tp.enable
+ end
+ end
+
+ def test_trace_point_disable_safe4
+ tp = TracePoint.new {}
+ assert_security_error_safe4 do
+ tp.disable
+ end
+ end
end