Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

only ask if `t` is empty once.

  • Loading branch information...
commit d04bcf94da9a19d9470f920587f8d2055d3b7108 1 parent 165d93b
Aaron Patterson tenderlove authored
5 actionpack/lib/action_dispatch/journey/gtg/transition_table.rb
View
@@ -40,6 +40,7 @@ def eclosure(t)
end
def move(t, a)
+ return [] if t.empty?
move_string(t, a).concat(move_regexp(t, a))
end
@@ -141,8 +142,6 @@ def states_hash_for(sym)
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 @@ def move_regexp(t, a)
end
def move_string(t, a)
- return [] if t.empty?
-
t.map do |s|
if states = @string_states[s]
states[a]
Please sign in to comment.
Something went wrong with that request. Please try again.