diff options
author | Jon Moss <me@jonathanmoss.me> | 2015-12-21 18:56:54 -0500 |
---|---|---|
committer | Jon Moss <me@jonathanmoss.me> | 2015-12-21 19:55:10 -0500 |
commit | 0c5287a668025df8566f983057e228515862c84a (patch) | |
tree | 2616db5be1f058bbdc0dbc5ce9720f8141283172 /actionpack/lib/action_dispatch/middleware | |
parent | 2de2263118d6763c11a02db05079a5b7a97a0a34 (diff) | |
download | rails-0c5287a668025df8566f983057e228515862c84a.tar.gz rails-0c5287a668025df8566f983057e228515862c84a.tar.bz2 rails-0c5287a668025df8566f983057e228515862c84a.zip |
Add #== back to ActionDispatch::MiddlewareStack::Middleware
This was causing bug #22738 to occur. Also added extra tests to make
sure everything is A-OK.
Diffstat (limited to 'actionpack/lib/action_dispatch/middleware')
-rw-r--r-- | actionpack/lib/action_dispatch/middleware/stack.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/stack.rb b/actionpack/lib/action_dispatch/middleware/stack.rb index 44fc1ee736..0b4bee5462 100644 --- a/actionpack/lib/action_dispatch/middleware/stack.rb +++ b/actionpack/lib/action_dispatch/middleware/stack.rb @@ -14,6 +14,15 @@ module ActionDispatch def name; klass.name; end + def ==(middleware) + case middleware + when Middleware + klass == middleware.klass + when Class + klass == middleware + end + end + def inspect if klass.is_a?(Class) klass.to_s |