
Issue #21299 has been reported by ianks (Ian Ker-Seymer). ---------------------------------------- Misc #21299: Proposal: Remove Continuation Feature from Ruby Core https://bugs.ruby-lang.org/issues/21299 * Author: ianks (Ian Ker-Seymer) * Status: Open * Assignee: ioquatix (Samuel Williams) ---------------------------------------- Continuations have been obsolete since Ruby 2.2 but still add complexity to the core codebase. I propose removing all continuation support from Ruby Core. ### Reasons #### Simplifies fiber code - Current fiber code in `cont.c` is complicated by shared logic with continuations - Removing continuations will simplify stack management, context switching, and reduce edge cases - Ultimately leading to: cleaner code, easier maintenance, possible performance improvements #### Low compatibility risk - Major libraries (e.g., [Metasploit](https://github.com/rapid7/metasploit-framework/pull/2413)) stopped using continuation years ago - Projects needing this functionality have found workarounds (e.g., hyperion_http simulates `callcc`) - [TruffleRuby does not support continuations](https://github.com/oracle/truffleruby/blob/ac88a0fe68bf957f75af7d316594b8973...), yet maintains high compatibility ### Proposed steps 1. Remove the continuation gem from default gems. 2. Delete all continuation-specific code in `cont.c`. 3. Add a stub gem that raises an exception if continuations are used. 4. Optionally document alternative approaches for users who still need this feature. -- https://bugs.ruby-lang.org/