Permalink
Browse files

Remove free usage of #tap

  • Loading branch information...
1 parent 3637656 commit 648a95b5263401264d4376a3819f9e232dcf3543 @carlosantoniodasilva carlosantoniodasilva committed Nov 8, 2012
Showing with 4 additions and 3 deletions.
  1. +4 −3 actionpack/lib/action_dispatch/middleware/flash.rb
@@ -82,13 +82,14 @@ def self.from_session_value(value)
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:

0 comments on commit 648a95b

Please sign in to comment.