-
Notifications
You must be signed in to change notification settings - Fork 191
Ruby -c does not detect unsupported syntax (false positive) #3330
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
Comments
This seems a bit more nefarious than i previously thought - https://github.com/oracle/truffleruby/blob/master/doc/user/compatibility.md does not seem to mention the whole "TruffleRuby doesnt do pattern matches" piece which is a pretty big deal especially when the interpreter validates the syntax. Is there an effort somewhere to get this working? |
And the fact is the current parser can parse pattern matching but it's not fully implemented yet (#3332) so that specific result is expected and Indeed, https://github.com/oracle/truffleruby/blob/master/doc/user/compatibility.md misses to mention that, I will update it. Array pattern matching is already supported with the |
Docs updated in e16a0c2 |
Thank you for the detailed explanation - looking forward to common parser and full(ish) compatibility with MRI syntax. Been a while since i've been free of the GIL in production. |
Fixed for 24.0 |
Running
/usr/lib/jvm/java-21-graalvm/bin/ruby -c somefile.rb
producesSyntax OK
despite the file containing pattern-matching case statements which the interpreter cannot resolve (syntax error, unexpected keyword_in
). This creates a false positive for tests trying to ensure that the resulting application is TruffleRuby-compatible.The text was updated successfully, but these errors were encountered: