Issue #21971 has been updated by byroot (Jean Boussier). Status changed from Open to Closed Forgot to close ---------------------------------------- Bug #21971: Backport commit 5de4cc560864 / PR #15848 https://bugs.ruby-lang.org/issues/21971#change-116907 * Author: mackuba (Kuba Suder) * Status: Closed * ruby -v: ruby 4.0.2 (2026-03-17 revision d3da9fec82) +PRISM [arm64-darwin24] * Backport: 3.2: DONTNEED, 3.3: DONTNEED, 3.4: DONTNEED, 4.0: REQUIRED ---------------------------------------- Follow-up to ticket: https://bugs.ruby-lang.org/issues/21824 There was a group of old commits merged before 4.0 which were meant to improve regexp performance in some cases. Unfortunately, they also greatly degraded regexp performance in some other cases. This was released in version 4.0.0, where I noticed it when testing the performance of the final version in my app, and reported it as 21824. Chris HasiĆski has fixed this on the master branch in commit 5de4cc56086493689701e86aa0ccf6a4a4a87d75, however this wasn't released as a bugfix with Ruby 4.0.1 & 4.0.2. It would be great if this could be backported to the ruby_4_0 branch and included in the 4.0.3 bugfix release. -- https://bugs.ruby-lang.org/