sinatra/sinatra — pull request #468 by philipp-kempgen (2012-02-18 23:44:26+00:00)
Title: Named captures

```ruby
get '/users/:user' do |*captures|
content_type 'text/plain'
body << "captures: #{captures.inspect}\n"
body << "request params: #{request.params.inspect}\n"
body << "params: #{params.inspect}\n"
halt body
end
```

`GET http://localhost:9292/users/alice?user=bob`

```
captures: ["alice"]
request params: {"user"=>"bobalice"}
params: {"user"=>"bobalice", "splat"=>[], "captures"=>["alice"]}
```

imho `params["user"]` should either be `"bob"` or `"alice"`, i.e. one of them should override the other parameter instead of getting concatenated. (#TODO Decide if it should be `"bob"` or `"alice"`.)

More importantly though I would prefer to be able to access named captures separately from the request parameters so I've added a `params["named_captures"]` hash.