From: "jeremyevans0 (Jeremy Evans)" Date: 2021-10-13T15:49:00+00:00 Subject: [ruby-core:105632] [Ruby master Bug#14103] Regexp absense operator has no chance to ^C Issue #14103 has been updated by jeremyevans0 (Jeremy Evans). I submitted a pull request to fix this: https://github.com/ruby/ruby/pull/4960 The issue is unlikely to be specific to the absence operator, I think it affects any case where a regexp takes a long time due to backtracking. In addition to allowing interrupts, the pull request also allows yielding to other threads during a long regexp match (since checking for interrupts has that effect). ---------------------------------------- Bug #14103: Regexp absense operator has no chance to ^C https://bugs.ruby-lang.org/issues/14103#change-94122 * Author: shyouhei (Shyouhei Urabe) * Status: Open * Priority: Normal * ruby -v: ruby 2.5.0dev (2017-11-09 trunk 60720) [x86_64-darwin15] * Backport: 2.3: UNKNOWN, 2.4: UNKNOWN ---------------------------------------- Following script hangs, with no respond to `^C`. ```ruby /(? (? (?~ \g ) ){0} (? (? (?! a ) ){0} \g \g \g /xo =~ (1..1024).map{|x| 'b' + 'a' * x }.join ``` -- https://bugs.ruby-lang.org/ Unsubscribe: