intridea/grape — pull request #188 by kainosnoema (2012-06-25 23:51:02+00:00)
Title: Fix multi-method routes to append '(.:format)' only once

Because the same path string is used for each loop when the routes are being built, appending the string using `<<` modifies the original, causing multiple '(.:format)' strings to be appended. This fixes the behavior, resulting in the proper path output.

I started with a spec which fails like this before the commit:

```
1) Grape::API.route should allow for multiple verbs
Failure/Error: route.route_path.should eql '/abc(.:format)'

expected: "/abc(.:format)"
got: "/abc(.:format)(.:format)"
```