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: utilities.rb
    path of file: ./repos/truffleruby/test/mri/tests/rubygems
    
    the code of the file until where you have to start completion: # frozen_string_literal: true
requi
    
  def execute_operations # :nodoc:
    @operations.each do |operation, *arguments|
      block = arguments.pop
      case operation
      when :gem then
        spec, gem = @test.util_gem(*arguments, &block)

        write_spec spec

        @gems[spec] = gem
        @installed << spec
      when :download then
        spec, gem = @test.util_gem(*arguments, &block)

        @gems[spec] = gem
        @downloaded << spec
      when :spec then
        spec = @test.util_spec(*arguments, &block)

        write_spec spec

        @gems[spec] = nil
        @installed << spec
      end
    end