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
HttpRouter::Route#significant_variable_names fails with Regexp routes #1205
Comments
Any way I can help out here? I'd love to help shepherd this into master and stop running off of a fork. |
Can you submit a pull request (with tests) to help us fix this issue for the next release? |
I'm having a bit of trouble recreating the behavior in a test. My issue (hopefully the same as freaky's -- the section of stack trace he copied is the same) isn't specifically with routing, but rather starting a server with an app mounted via regex. I'm mounting an app with
If I put a raise after that line, I see it, so it's not crashing on the mount. However, when it actually goes to setup the server, that's where I'm seeing the above error. This error is not occurring in 0.10.6. Do any of the tests actually call I'll keep poking around! UPDATE: Oops, it is the route. Back to poking! UPDATE 2: Actually, looks like it's the combination of the two for me. Regexp mount + Regexp route = explosion. |
I found a way to recreate the condition, although it's a little indirect. It triggered for me specifically because I was using a Regexp + the :provides option. My commit is simply @Freaky's fix with @dariocravero's suggestions. Let me know if I can help with anything else. |
Can you send this as a pull request making it easier to merge, thanks! |
Fix #1205 -- parsing issue when using :provides with a Regexp route.
Any Regexp based routes blow up with this:
The fix looks simple enough -- Freaky@fff442a
This also allows further validation of named captures, and removes the ugly use of the ternary operator. Will try to sort out test case over the weekend.
The text was updated successfully, but these errors were encountered: