summaryrefslogtreecommitdiff
path: root/test/ruby/test_jit.rb
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2021-08-12 23:19:15 -0700
committerTakashi Kokubun <takashikkbn@gmail.com>2021-08-12 23:26:44 -0700
commitac4d53bd461ff386cd45fdd484ffb6b628a251ad (patch)
tree9dd22e012d1feb655023819460e1e1090932ee8d /test/ruby/test_jit.rb
parent365da4c6ace385f08b97bd657ff5a118055e8ad1 (diff)
Don't cancel JIT-ed code on TracePoint :class
events get enabled
Diffstat (limited to 'test/ruby/test_jit.rb')
-rw-r--r--test/ruby/test_jit.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ruby/test_jit.rb b/test/ruby/test_jit.rb
index d6306dcfc9..60e128b3d9 100644
--- a/test/ruby/test_jit.rb
+++ b/test/ruby/test_jit.rb
@@ -1101,6 +1101,14 @@ class TestJIT < Test::Unit::TestCase
end;
end
+ def test_not_cancel_by_tracepoint_class
+ assert_eval_with_jit("#{<<~"begin;"}\n#{<<~"end;"}", success_count: 1, min_calls: 2)
+ begin;
+ TracePoint.new(:class) {}.enable
+ 2.times {}
+ end;
+ end
+
def test_cancel_by_tracepoint
assert_eval_with_jit("#{<<~"begin;"}\n#{<<~"end;"}", success_count: 0, min_calls: 2)
begin;