diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-01-29 07:51:00 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-01-29 07:51:00 +0000 |
commit | 499ca89e24c47cfada7e493a7dfd81cdb9323a45 (patch) | |
tree | b19a55192318638f6e1cabb8e7fb795dafd249d0 /test | |
parent | e26c2bc21baac04ab52bff4eeedd9f41e4cb1f31 (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')
-rw-r--r-- | test/ruby/test_settracefunc.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/ruby/test_settracefunc.rb b/test/ruby/test_settracefunc.rb index 264b805127..e7c010aaaf 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 |