From 648a95b5263401264d4376a3819f9e232dcf3543 Mon Sep 17 00:00:00 2001 From: Carlos Antonio da Silva Date: Thu, 8 Nov 2012 20:15:35 -0200 Subject: Remove free usage of #tap --- actionpack/lib/action_dispatch/middleware/flash.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'actionpack/lib/action_dispatch/middleware/flash.rb') diff --git a/actionpack/lib/action_dispatch/middleware/flash.rb b/actionpack/lib/action_dispatch/middleware/flash.rb index df87edd156..a162b791e5 100644 --- a/actionpack/lib/action_dispatch/middleware/flash.rb +++ b/actionpack/lib/action_dispatch/middleware/flash.rb @@ -82,13 +82,14 @@ module ActionDispatch else new end - - flash.tap(&:sweep) + + flash.sweep + flash end def to_session_value return nil if empty? - {'discard' => @discard.to_a, 'flashes' => @flashes} + { 'discard' => @discard.to_a, 'flashes' => @flashes } end def initialize(flashes = {}, discard = []) #:nodoc: -- cgit v1.2.3