aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--actionpack/lib/action_dispatch/journey/gtg/transition_table.rb5
1 files changed, 1 insertions, 4 deletions
diff --git a/actionpack/lib/action_dispatch/journey/gtg/transition_table.rb b/actionpack/lib/action_dispatch/journey/gtg/transition_table.rb
index e6212b1ee2..53c47f4696 100644
--- a/actionpack/lib/action_dispatch/journey/gtg/transition_table.rb
+++ b/actionpack/lib/action_dispatch/journey/gtg/transition_table.rb
@@ -40,6 +40,7 @@ module ActionDispatch
end
def move(t, a)
+ return [] if t.empty?
move_string(t, a).concat(move_regexp(t, a))
end
@@ -141,8 +142,6 @@ module ActionDispatch
end
def move_regexp(t, a)
- return [] if t.empty?
-
t.flat_map { |s|
if states = @regexp_states[s]
states.map { |re, v| re === a ? v : nil }
@@ -151,8 +150,6 @@ module ActionDispatch
end
def move_string(t, a)
- return [] if t.empty?
-
t.map do |s|
if states = @string_states[s]
states[a]