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: uninstaller.rb
    path of file: ./repos/powerstation/powerstation/lib/compiled-jruby/lib/ruby/stdlib/rubygems
    
    the code of the file until where you have to start completion: #--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
# See LICENSE.txt for permissions.
#++

require 'fileutils'
require 'rubygems'
require 'rubygems/depe
    
  def formatted_program_filename filename # :nodoc:
    # TODO perhaps the installer should leave a small manifest
    # of what it did for us to find rather than trying to recreate
    # it again.
    if @format_executable then
      require 'rubygems/installer'
      Gem::Installer.exec_format % File.basename(filename)
    else
      filename
    end