Skip to content

Support the same Regexps to be Regexp.linear_time? as CRuby #3858

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
eregon opened this issue May 9, 2025 · 1 comment
Open

Support the same Regexps to be Regexp.linear_time? as CRuby #3858

eregon opened this issue May 9, 2025 · 1 comment
Assignees

Comments

@eregon
Copy link
Member

eregon commented May 9, 2025

We noticed in ruby/net-imap#470 that some Regexp are not Regexp.linear_time? on TruffleRuby, but they should be.
See the output in CI of that PR/repo, e.g. https://github.com/ruby/net-imap/actions/runs/14917675208/job/41906831286#step:5:54

One specific I noticed is /[\x80-\xff\r\n]/n, which I have a fix for.
(cc @nevans)

@eregon eregon self-assigned this May 9, 2025
graalvmbot pushed a commit that referenced this issue May 9, 2025
* See #3858
* We need to pass a java.lang.String to TRegex, in this case we can pass it as
  raw bytes since we also pass the encoding name to TRegex.
* Remove the UnsupportedCharsetException catch clause as no Charset should be
  involved in this conversion since the migration to TruffleString.
@eregon
Copy link
Member Author

eregon commented May 12, 2025

Need to look at a new run now that #3859 got merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant