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: kernel.rb
    path of file: ./repos/natalie/src
    
    the code of the file until where you have to start completion: require 'natalie/inline'

module
    
    def format_char(token, arg)
      if arg.nil?
        raise TypeError, 'no implicit conversion from nil to integer'
      elsif arg.is_a?(Integer)
        arg.chr(format_string.encoding)
      elsif arg.respond_to?(:to_int)
        i = arg.to_int
        unless i.is_a?(Integer)
          raise TypeError, "can't convert Object to Integer (#{arg.class.name}#to_int gives #{i.class.name})"
        end