From: "Earlopain (Earlopain _) via ruby-core" Date: 2026-07-11T14:01:09+00:00 Subject: [ruby-core:126049] [Ruby Bug#22191] `Signal.trap(:EXIT)` exception only shown if `at_exit` also raises Issue #22191 has been reported by Earlopain (Earlopain _). ---------------------------------------- Bug #22191: `Signal.trap(:EXIT)` exception only shown if `at_exit` also raises https://bugs.ruby-lang.org/issues/22191 * Author: Earlopain (Earlopain _) * Status: Open * ruby -v: ruby 4.1.0dev (2026-05-29T14:34:40Z master 7a07a54298) +PRISM [x86_64-linux] * Backport: 3.3: UNKNOWN, 3.4: UNKNOWN, 4.0: UNKNOWN ---------------------------------------- ```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
': bar (RuntimeError) # test.rb:1:in 'block in
': foo (RuntimeError) ``` A bit weird -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/