-
-
Notifications
You must be signed in to change notification settings - Fork 925
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
A regexp with \K doesn't work in JRuby #4871
Comments
Huh, I'm not familiar with |
@headius, I must admit, I had never encountered \K either. I found this problem (and the one regarding \X) by testing diffs between Java and Ruby on Regular-Expressions.info. Most headings in that TOC links to a page where the compared flavors can be selected at the top. I found it to be quite helpful. |
Done in jruby/joni@59dbb27 |
AFAICT, this isn't completely fixed. When running my example I get a warning
|
There was indeed a break missing for \K in the lexer. Fixed in jruby/joni@ee4bafb |
joni-2.1.28 is released |
Thanks. Works like a charm! |
@thallgren, can you show the case that was not matching (or a reduced form of it), se we can plug it into our test suite ? |
My test is for an evaluator for the Puppet type system, written in Java. It has its own |
Environment
jruby-9.1.7.0 running on Linux 4.13.13-100.fc25.x86_64 #1 SMP Wed Nov 15 17:33:19 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
Expected Behavior
The text matched by the part of the regex to the left of the \K is omitted from the overall regex match. Other than that the regex is matched normally from left to right.
Actual Behavior
\K does not match anything when using JRuby.
The text was updated successfully, but these errors were encountered: