aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/journey/gtg
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_dispatch/journey/gtg')
-rw-r--r--actionpack/lib/action_dispatch/journey/gtg/transition_table.rb26
1 files changed, 12 insertions, 14 deletions
diff --git a/actionpack/lib/action_dispatch/journey/gtg/transition_table.rb b/actionpack/lib/action_dispatch/journey/gtg/transition_table.rb
index 821b510b9e..990d2127ee 100644
--- a/actionpack/lib/action_dispatch/journey/gtg/transition_table.rb
+++ b/actionpack/lib/action_dispatch/journey/gtg/transition_table.rb
@@ -41,7 +41,18 @@ module ActionDispatch
def move(t, a)
return [] if t.empty?
- move_string(t, a)
+
+ regexps = []
+
+ t.map { |s|
+ if states = @regexp_states[s]
+ regexps.concat states.map { |re, v| re === a ? v : nil }
+ end
+
+ if states = @string_states[s]
+ states[a]
+ end
+ }.compact.concat regexps
end
def as_json(options = nil)
@@ -140,19 +151,6 @@ module ActionDispatch
raise ArgumentError, 'unknown symbol: %s' % sym.class
end
end
-
- def move_string(t, a)
- regexps = []
- t.map { |s|
- if states = @regexp_states[s]
- regexps.concat states.map { |re, v| re === a ? v : nil }
- end
-
- if states = @string_states[s]
- states[a]
- end
- }.compact.concat regexps
- end
end
end
end