diff --git a/lib/stackprof.rb b/lib/stackprof.rb index 0d39dca8..fbea42bb 100644 --- a/lib/stackprof.rb +++ b/lib/stackprof.rb @@ -5,7 +5,11 @@ end if defined?(RubyVM::YJIT) && RubyVM::YJIT.enabled? - StackProf.use_postponed_job! + if RUBY_VERSION < "3.3" + # On 3.3 we don't need postponed jobs: + # https://github.com/ruby/ruby/commit/a1dc1a3de9683daf5a543d6f618e17aabfcb8708 + StackProf.use_postponed_job! + end elsif RUBY_VERSION == "3.2.0" # 3.2.0 crash is the signal is received at the wrong time. # Fixed in https://github.com/ruby/ruby/pull/7116