Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
HttpRouter::Route#significant_variable_names fails with Regexp routes #1205
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.
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.