General

Profile

jirkamarsik (Jirka Marsik)

  • Login: jirkamarsik
  • Registered on: 11/23/2020
  • Last sign in: 02/27/2024

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 8 3 11

Activity

02/29/2024

05:21 PM Ruby Bug #20316 (Open): Regexp quantifier behavior changes in different syntactic context.
In the example below, adding a vertical bar to the end of a regular expression changes what is being matched by the preceding regular expression.
```
irb(main):001:0> /(|a){3}b/.match("aab")
=> #<MatchData "aab" 1:"">
irb(main):002...
jirkamarsik (Jirka Marsik)
04:59 PM Ruby Bug #20315 (Open): Quantifier expansion leads to different results in Regexp.
Consider the following series of regular expression matches:
```
irb(main):001:0> /(|a)(|a)(|a)(|a)(|a)b/.match("aaaab")
=> #<MatchData "aaaab" 1:"" 2:"a" 3:"a" 4:"a" 5:"a">
irb(main):002:0> /(|a)(|a)(|a)(|a)b/.match("aaab")
=> #<Ma...
jirkamarsik (Jirka Marsik)

02/03/2024

11:04 PM Ruby Bug #20225: Inconsistent behavior of regex matching for a regex has a null loop
In TruffleRuby, we implement null checks which take into account both matching position and captures, in the spirit of Ruby's regular expressions. Both of the examples from your original issue description evaluate to `0`, and `/((?=(a)))... jirkamarsik (Jirka Marsik)
10:55 PM Ruby Bug #20225: Inconsistent behavior of regex matching for a regex has a null loop
As I understand it, the idea behind the null check is for the regex matcher to be able to identify unproductive branches in the regex execution, branches which are guaranteed to never terminate. When executing the expression `X*`, where ... jirkamarsik (Jirka Marsik)

03/14/2022

03:44 PM Ruby Bug #18631 (Closed): Range check breaks multiplex backreferences in regular expressions
The regular expression engine can sometimes produce wrong results when using multiplex backreferences near the end of the input string.
``` ruby
irb(main):001:0> /(?<x>a)(?<x>aa)\k<x>/.match("aaaaa")
=> #<MatchData "aaaaa" x:"a" x:"...
jirkamarsik (Jirka Marsik)

06/29/2021

12:05 PM Ruby Bug #18013: Unexpected results when mxiing negated character classes and case-folding
duerst (Martin Dürst) wrote in #note-2:
> Just a question: What's the purpose of nested character classes?
They are useful in combination with the set intersection operator `&&`. They let you, e.g., exclude characters from some chara...
jirkamarsik (Jirka Marsik)
09:28 AM Ruby Bug #18013: Unexpected results when mxiing negated character classes and case-folding
This is a simpler reproducer.
```
irb(main):003:0> /[^a]/i.match("a")
=> nil
irb(main):004:0> /[[^a]]/i.match("a")
=> #<MatchData "a">
```
jirkamarsik (Jirka Marsik)
08:55 AM Ruby Bug #18013 (Open): Unexpected results when mxiing negated character classes and case-folding
```
irb(main):001:0> /[^a-c]/i.match("A")
=> nil
irb(main):002:0> /[[^a-c]]/i.match("A")
=> #<MatchData "A">
```
The two regular expressions above match different strings, because the character classes denote different sets of ch...
jirkamarsik (Jirka Marsik)
08:35 AM Ruby Bug #18012 (Open): Case-insensitive character classes can only match multiple code points when top-level character class is not negated
Some Unicode characters case-fold to strings of multiple code points, e.g. the ligature `\ufb00` can match the string `ff`.
```
irb(main):001:0> /\A[\ufb00]\z/i.match("\ufb00")
=> #<MatchData "ff">
irb(main):002:0> /\A[\ufb00]\z/i.m...
jirkamarsik (Jirka Marsik)

06/28/2021

09:30 AM Ruby Bug #18010 (Open): Character class with single character gets case-folded with following string
```
irb(main):001:0> /ff/i.match("\ufb00")
=> #<MatchData "ff">
irb(main):002:0> /[f]f/i.match("\ufb00")
=> #<MatchData "ff">
irb(main):003:0> /f[f]/i.match("\ufb00")
=> nil
irb(main):004:0> /[f][f]/i.match("\ufb00")
=> nil
irb(ma...
jirkamarsik (Jirka Marsik)

Also available in: Atom