Skip to content

Commit

Permalink
Merge branch 'master' of github.com:rails/journey
Browse files Browse the repository at this point in the history
* 'master' of github.com:rails/journey:
  Sort the alphabet so the order is consistent
  • Loading branch information
tenderlove committed Dec 21, 2011
2 parents e8553d5 + 8aa56f4 commit 34d0dec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/journey/nfa/transition_table.rb
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def move t, a
end

def alphabet
inverted.values.map(&:keys).flatten.compact.uniq
inverted.values.map(&:keys).flatten.compact.uniq.sort_by { |x| x.to_s }
end

###
Expand Down
2 changes: 1 addition & 1 deletion test/nfa/test_transition_table.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def test_following_states_regexp

def test_alphabet
table = tt 'a|:a'
assert_equal ['a', /[^\.\/\?]+/], table.alphabet
assert_equal [/[^\.\/\?]+/, 'a'], table.alphabet

table = tt 'a|a'
assert_equal ['a'], table.alphabet
Expand Down

0 comments on commit 34d0dec

Please sign in to comment.