I attempted a fix for sinatra/sinatra#611 by making the parsing regex somewhat more robust.
For now the specs seem to pass, but I'm not entirely sure that this is the best way going forward, so please review it and any comments would be appreciated.
I added a few more specs, such as support for lower-case URL-encoded entities according to http://tools.ietf.org/html/rfc3986#section-2.1
[FIX] Make route parsing regex more robust
- fixes sinatra/sinatra/#611
- adds support for case-insensitive URL encoding
[FIX] Support ruby 1.8 in routing regex