Right; :ratchet turns off backtracking, but the `|` operator still needs to find the best match. I should have said "LTM" rather than backtracking, since that's what I was referring to--trying multiple terms to find the best match.
On Tue, Sep 12, 2017 at 2:20 PM Patrick R. Michaud via RT < perl6-bugs-follo...@perl.org> wrote: > On Mon, Sep 11, 2017 at 09:48:01AM -0700, Dan Zwell wrote: > > > > `|` matches the longest input: > > > 'ab' ~~ / ^:ratchet [ . | .. ] $ / > > 「ab」 > > > > If the regex contains empty code blocks, backtracking fails: > > > 'ab' ~~ / ^:ratchet [ {}. | {}.. ] $ / > > Nil > > Isn't the whole point of :ratchet to turn off backtracking...? From S05 > (which I know isn't official anymore but it describes what :ratchet does or > was intended to do): > > "The new :r or :ratchet modifier causes this regex to not backtrack by > default." > > It looks to me like the two above examples are working exactly as > designed/intended. > > Pm > >