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: helpers.rb
    path of file: ./repos/asciidoctor/lib/asciidoctor
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module Asciidoctor
# Internal: Except where noted, a module that contain
    
    def encode_uri_component str
      # patch necessary to adhere with RFC-3986 (and thus CGI.escape)
      # see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent#Description
      %x(
        return encodeURIComponent(str).replace(/%20|[!'()*]/g, function (m) {
          return m === '%20' ? '+' : '%' + m.charCodeAt(0).toString(16)
        })
      )
    end