Skip to content

Commit

Permalink
In URLMap, entries without host name should come first
Browse files Browse the repository at this point in the history
  • Loading branch information
leahneukirchen committed Jan 5, 2009
1 parent 3d0f4cd commit bc5571f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rack/urlmap.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def initialize(map)
location = location.chomp('/')

[host, location, app]
}.sort_by { |(h, l, a)| -l.size } # Longest path first
}.sort_by { |(h, l, a)| [-l.size, h.to_s.size] } # Longest path first
end

def call(env)
Expand Down

0 comments on commit bc5571f

Please sign in to comment.