Skip to content

Commit

Permalink
Pickle::Parser::Mappings#matchers should return mapping in reverse or…
Browse files Browse the repository at this point in the history
…der of length, so that longer mappings get a chance to match first
  • Loading branch information
ianwhite committed Aug 25, 2010
1 parent 8731ede commit 8fb1f08
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/pickle/parser/matchers.rb
Expand Up @@ -74,7 +74,7 @@ def predicates
end

def mappings
config && config.mappings.map(&:search)
config && config.mappings.map(&:search).sort_by(&:length).reverse
end

def factories
Expand Down

0 comments on commit 8fb1f08

Please sign in to comment.