mirror of
https://github.com/ruby/ruby.git
synced 2025-08-28 15:36:16 +02:00
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
This commit is contained in:
parent
e26c2bc21b
commit
499ca89e24
3 changed files with 26 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue