John Hawthorn 2026-02-07 16:44:08 +0000 (Sat, 07 Feb 2026)
New Revision: 3e02e99e42
https://github.com/ruby/ruby/commit/3e02e99e42
Log:
Fix signal crash during keyword argument call
64f508ade8 changed rb_threadptr_raise to call rb_exception_setup,
which uses rb_scan_args with RB_SCAN_ARGS_PASS_CALLED_KEYWORDS.
This checked rb_keyword_given_p(), which read the interrupted
frame's keyword state rather than the signal raise arguments,
causing a crash when a signal arrived during a keyword call.
Revert rb_threadptr_raise to use rb_make_exception directly, and
have thread_raise_m call rb_exception_setup where
rb_keyword_given_p() reflects the correct frame.
[Bug #21865]
Modified files:
test/ruby/test_signal.rb
thread.c