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: installer.rb
    path of file: ./repos/ruby-packer/ruby/lib/rubygems
    
    the code of the file until where you have to start completion: # frozen_string_literal: true
#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All r
    
  def run_post_build_hooks # :nodoc:
    Gem.post_build_hooks.each do |hook|
      if hook.call(self) == false
        FileUtils.rm_rf gem_dir

        location = " at #{$1}" if hook.inspect =~ /[ @](.*:\d+)/

        message = "post-build hook#{location} failed for #{spec.full_name}"
        raise Gem::InstallError, message
      end
    end