Bug #20095
closed
Regex lookahead behaving strangely in 3.3.0
Added by sisyphus_cg (Sisyphus CG) 11 months ago.
Updated 8 months ago.
Description
Multiple regex lookaheads seem to behave strangely in 3.3.0:
p "xxx" =~ /(?=.*x)x(?=banana)/ # 2
Clearly, the string xxx
does not contain banana
, so this regex should never match, but it does.
- Backport changed from 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN to 3.0: DONTNEED, 3.1: DONTNEED, 3.2: DONTNEED, 3.3: REQUIRED
- Is duplicate of Bug #20083: String#match? behaving inconsistently with Ruby 3.3.0 added
It is the exact same as #20207.
- Status changed from Open to Closed
If the duplicate has already be resolved, then let's close this, too.
- Backport changed from 3.0: DONTNEED, 3.1: DONTNEED, 3.2: DONTNEED, 3.3: REQUIRED to 3.0: DONTNEED, 3.1: DONTNEED, 3.2: DONTNEED, 3.3: DONE
Also available in: Atom
PDF
Like0
Like0Like0Like0Like0Like0Like0