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: env_helper.rb
    path of file: ./repos/vglist/spec/support
    
    the code of the file until where you have to start completion: # typed: false
# Helper to enable mocking ENV variables in tests.
#
# Based on https://stackoverflow.com
    
  def with_environment(replacement_env)
    original_env = ENV.to_hash
    ENV.update(replacement_env)

    yield
  ensure
    ENV.replace(original_env)
  end