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: output_to_fd.rb
    path of file: ./repos/ruby-packer/ruby/spec/mspec/lib/mspec/matchers
    
    the code of the file until where you have to start completion: require 'mspec/helpers/tmp'

# Lower-level output speccing mechanism for a single
# output stream. Unlike
    
  def with_tmp
    path = tmp("mspec_output_to_#{$$}_#{Time.now.to_i}")
    File.open(path, 'w+') { |io|
      yield(io)
    }
  ensure
    File.delete path if path
  end