From 499ca89e24c47cfada7e493a7dfd81cdb9323a45 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 29 Jan 2013 07:51:00 +0000 Subject: 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 --- test/ruby/test_settracefunc.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'test') 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 -- cgit v1.2.3