1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/actionpack/lib/action_dispatch/journey
Jon Moss 0713265fd1 Use next instead of break; avoid terminating whole loop
We want to avoid terminating the whole loop here, because it will cause
parameters that should be removed to not be removed, since we are
terminating early. In this specific case, `param2` is processed before
`param1` due to the reversing of `route.parts`, and since `param2` fails
the check on this line, it would previously cause the whole loop to
fail, and `param1` would still be in `parameterized_parts`. Now, we are
simply calling `next`, which is the intended behavior.

Introduced by 8ca8a2d773.

Fixes #27454.
2016-12-29 10:40:47 -05:00
..
gtg Add more rubocop rules about whitespaces 2016-10-29 01:17:49 -02:00
nfa Add more rubocop rules about whitespaces 2016-10-29 01:17:49 -02:00
nodes applies new string literal convention in actionpack/lib 2016-08-06 18:51:43 +02:00
path applies remaining conventions across the project 2016-08-06 20:20:22 +02:00
router Privatize unneededly protected methods in Action Pack 2016-12-24 18:54:48 +09:00
visualizer CSS fix for the router visualizer 2014-11-25 18:46:01 +01:00
formatter.rb Use next instead of break; avoid terminating whole loop 2016-12-29 10:40:47 -05:00
parser.rb Shave a couple of allocations off Journey scan & parse 2016-12-25 01:04:08 +10:30
parser.y Shave a couple of allocations off Journey scan & parse 2016-12-25 01:04:08 +10:30
parser_extras.rb Remove all Journey constant from public API 2016-10-26 15:25:45 -02:00
route.rb Optimize Journey::Route#score 2016-12-28 17:19:15 -08:00
router.rb Add more rubocop rules about whitespaces 2016-10-29 01:17:49 -02:00
routes.rb move route allocation to a factory method on the mapping object 2015-08-15 14:34:37 -07:00
scanner.rb Shave a couple of allocations off Journey scan & parse 2016-12-25 01:04:08 +10:30
visitors.rb Add more rubocop rules about whitespaces 2016-10-29 01:17:49 -02:00