-
Notifications
You must be signed in to change notification settings - Fork 185
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
pattern match bug with internal array #2617
Comments
Pattern matching is not implemented yet, that's why it's a SyntaxError. |
Does httpx support Ruby <= 2.6 which doesn't have pattern matching? It seems so from the gemspec & CI files. |
It does. The detection is only relevant for tests, and is based on ruby version. For the library, the extensions are fairly safe even if pattern matching wouldn't be supported. I guess I can use the |
In general feature detection is much better than checking RUBY_VERSION (also applies to C APIs BTW), RUBY_VERSION should IMHO only be used when there is no other reasonable way (very rare). |
Sorry, I meant ruby version is pretty reliable if I can't do feature detection (i.e. |
Applied the patch, should this be kept open? |
Let's close this, we have other issues to track pattern matching support, and until then the SyntaxError is expected. |
Given truffleruby's ruby 3 support, a new codepath was unlocked in httpx test suite which surfaced what it seems like a parser bug.
This should also be easily reproducible just by copying the line with the pattern match (I did it using irb and it crashed the console).
The text was updated successfully, but these errors were encountered: