rails/rails — pull request #4879 by kennyj (2012-02-04 14:06:02+00:00)
Title: Fix GH #4873. Allow swapping same class middleware.

I don't allow swapping same class middleware in current implementation.

```ruby
config.middleware.swap ActionDispatch::ShowExceptions,
ActionDispatch::ShowExceptions,
lambda { |env| [ 500, {}, ['error!'] ] }
```

Please see https://github.com/rails/rails/issues/4873

This issuei is also existed on 3-2-stable..