diff options
-rw-r--r-- | actionpack/lib/action_dispatch/routing/route_set.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb index 35f1653a49..b72031633b 100644 --- a/actionpack/lib/action_dispatch/routing/route_set.rb +++ b/actionpack/lib/action_dispatch/routing/route_set.rb @@ -546,16 +546,16 @@ module ActionDispatch pattern = Journey::Path::Pattern.new(strexp) - builder = Journey::GTG::Builder.new pattern.spec + builder = Journey::GTG::Builder.new ast # Get all the symbol nodes followed by literals that are not the # dummy node. - symbols = pattern.spec.grep(Journey::Nodes::Symbol).find_all { |n| + symbols = ast.grep(Journey::Nodes::Symbol).find_all { |n| builder.followpos(n).first.literal? } # Get all the symbol nodes preceded by literals. - symbols.concat pattern.spec.find_all(&:literal?).map { |n| + symbols.concat ast.find_all(&:literal?).map { |n| builder.followpos(n).first }.find_all(&:symbol?) |