Double check under console
ree-1.8.7-2011.03 :001 > Rails.configuration.middleware
=> #, Rack::Runtime, Rack::MethodOverride, Rails::Rack::Logger, ActionDispatch::ShowExceptions, ActionDispatch::RemoteIp, Rack::Sendfile, ActionDispatch::Reloader, ActionDispatch::Callbacks, ActiveRecord::ConnectionAdapters::ConnectionManagement, ActiveRecord::QueryCache, ActionDispatch::Cookies, ActionDispatch::Session::CookieStore, ActionDispatch::Flash, ActionDispatch::ParamsParser, ActionDispatch::Head, Rack::ConditionalGet, Rack::ETag, ActionDispatch::BestStandardsSupport]>
That seems normal. The added middleware is an instance of the class, not the object itself.
It's not a bug and I believe this to be the expected behavior.
Isn't it? It looks a bit ugly, unless there is way to beautify it.
There would be a way, which would be to overwrite the #inspect method of the object. But that would make it unclear with possible side effects.
To fix this, someone should not overwrite the #inspect method, but call other method on Middleware, perhaps, to_s, which should be defined to display the Middleware in a more beautiful way.
I don't think this should be changed.
This representation has a meaning which is understood by developers because it's defined like that by the ruby language.
Changing it will make the representation of this instance harder to understand.
Moreover, to be implemented properly, it'd require to define it for all classes, not only this one.
Any new middleware can be added to the stack and it won't be displayed the same way as this one.
Sure. I totally agree with you and believe it's not an issue. My sentence if conditional =)
If so, i close it.