diff options
author | Gibheer <gibheer@gmail.com> | 2013-01-29 15:28:59 +0100 |
---|---|---|
committer | Gibheer <gibheer@gmail.com> | 2013-01-29 15:28:59 +0100 |
commit | 335dbdd487cde05451078b18dbea6f87901d08e8 (patch) | |
tree | 8f0cd259229f3a2387fa206aad61c5e09144caf6 /lib | |
parent | 27442f40613cb3a557ca7a0a9d34a4e4296072bd (diff) |
catch empty routes
This fixes a bug where an empty route would catch all requests resulting
in all routes found with the empty route.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/zero/router.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/zero/router.rb b/lib/zero/router.rb index 8d1273f..e5b513c 100644 --- a/lib/zero/router.rb +++ b/lib/zero/router.rb @@ -40,7 +40,7 @@ module Zero routes.each do |route, target| @routes[ Regexp.new( - route.gsub(VARIABLE_MATCH, VARIABLE_REGEX) + '$')] = target + '^' + route.gsub(VARIABLE_MATCH, VARIABLE_REGEX) + '$')] = target end end |