-
Daniel Colson authored
This was originally added in https://github.com/rails/rails/commit/8d26f875f70beef3062deb5ded9c5ffcd473d5ac, 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 https://github.com/rails/rails/blob/6ab985da28fd4e2b5c93b50ed4952f43459f8bce/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.
Daniel Colson authoredThis was originally added in https://github.com/rails/rails/commit/8d26f875f70beef3062deb5ded9c5ffcd473d5ac, 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 https://github.com/rails/rails/blob/6ab985da28fd4e2b5c93b50ed4952f43459f8bce/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.
Loading