From 0c5287a668025df8566f983057e228515862c84a Mon Sep 17 00:00:00 2001 From: Jon Moss Date: Mon, 21 Dec 2015 18:56:54 -0500 Subject: Add #== back to ActionDispatch::MiddlewareStack::Middleware This was causing bug #22738 to occur. Also added extra tests to make sure everything is A-OK. --- actionpack/lib/action_dispatch/middleware/stack.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'actionpack/lib/action_dispatch') 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 -- cgit v1.2.3