You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: flash.rb
    path of file: ./repos/stackneveroverflow/vendor/bundle/ruby/2.3.0/gems/actionpack-5.0.3/lib/action_dispatch/middleware
    
    the code of the file until where you have to start completion: require 'active_support/core_ext/hash/keys'

module ActionDispatch
  # The flash provides a way to pass tempora
    
      def commit_flash # :nodoc:
        session    = self.session || {}
        flash_hash = self.flash_hash

        if flash_hash && (flash_hash.present? || session.key?('flash'))
          session["flash"] = flash_hash.to_session_value
          self.flash = flash_hash.dup
        end