From: "hsbt (Hiroshi SHIBATA) via ruby-core" Date: 2023-02-25T09:34:02+00:00 Subject: [ruby-core:112596] [Ruby master Bug#19467] Some linear_time regexp does not match in linear time Issue #19467 has been updated by hsbt (Hiroshi SHIBATA). Status changed from Open to Assigned Assignee set to make_now_just (Hiroya Fujinami) ---------------------------------------- Bug #19467: Some linear_time regexp does not match in linear time https://bugs.ruby-lang.org/issues/19467#change-102043 * Author: tompng (tomoya ishida) * Status: Assigned * Priority: Normal * Assignee: make_now_just (Hiroya Fujinami) * ruby -v: ruby 3.3.0dev (2023-02-17T18:10:16Z master c3bae033eb) [x86_64-linux] * Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN ---------------------------------------- `Regexp.linear_time?(/\A.*a.*x\z/) #=> true` but it does not match in linear time ~~~ruby Regexp.linear_time? /\A(.*a.*)x\z/ #=> true /\A(.*a.*)x\z/ =~ 'a'*100000+'y' #=> nil, processing time: 0.016995s Regexp.linear_time? /\A.*a.*x\z/ #=> true /\A.*a.*x\z/ =~ 'a'*100000+'y' #=> nil, processing time: 21.479335s ~~~ -- 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/postorius/lists/ruby-core.ml.ruby-lang.org/