Issue #22191 has been updated by nagachika (Tomoyuki Chikanaga). Backport changed from 3.3: REQUIRED, 3.4: REQUIRED, 4.0: DONE to 3.3: REQUIRED, 3.4: DONE, 4.0: DONE ruby_3_4 commit:e1bb38b7a6b8900e1eb8fbd37271a911b37729b5 merged revision(s) commit:0d7e50a1746bfa3db2a50478d3680cd7c36ea383. ---------------------------------------- Bug #22191: `Signal.trap(:EXIT)` exception only shown if `at_exit` also raises https://bugs.ruby-lang.org/issues/22191#change-118458 * Author: Earlopain (Earlopain _) * Status: Closed * ruby -v: ruby 4.1.0dev (2026-05-29T14:34:40Z master 7a07a54298) +PRISM [x86_64-linux] * Backport: 3.3: REQUIRED, 3.4: DONE, 4.0: DONE ---------------------------------------- ```rb Signal.trap(:EXIT, proc { raise "foo" }) # No output ``` ```rb Signal.trap(:EXIT, proc { raise "foo" }) at_exit { raise "bar" } # test.rb:2:in 'block in <main>': bar (RuntimeError) # test.rb:1:in 'block in <main>': foo (RuntimeError) ``` A bit weird -- https://bugs.ruby-lang.org/