1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/actionpack/test/journey/nodes/symbol_test.rb
Daniel Colson 0011e098a1
Remove regex alteration for custom routes
This was originally added in
8d26f875f7,
and then updated to something closer to it's current form in
https://github.com/rails/rails/pull/23140

The purpose was to alter the regexp for symbols surrounded by literals
(for path parameters within path segments like "/foo-:bar" or
"/:foo-bar") so that `default_regexp?` would return `false` for those
symbols. `default_regexp?` was then used to partition the routes (see
6ab985da28/actionpack/lib/action_dispatch/journey/routes.rb (L44)).

But after https://github.com/rails/rails/pull/41024, we're no longer
partitioning routes using `default_regexp?` (in fact we're no longer
using the method at all, so I've removed it). So I think it may now be
possible to remove this.

Prior to https://github.com/rails/rails/pull/41024, removing this code
would have broken the tests added in
https://github.com/rails/rails/pull/23140, but those tests now pass
without it. I also tried this patch with the GitHub monolith and didn't
get any test failures.
2021-07-29 15:01:48 -04:00

0 lines
Ruby