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

# Implementation of the "ARCFOUR" algorithm ("alleged RC4 (tm)"). Implemented
# as described at:
# http://www.mozilla.org/projects/security/pki/nss/draft-kaukonen-cipher-arcfour-03.txt
#
# "RC4" is a trademark of RSA Data Security, Inc.
#
# @private
class Arcfour
  def initialize(key)
    # Convert string key to Array of integers
    key = key.unpack('c*') if ke
    
  def initialize(key)
    # Convert string key to Array of integers
    key = key.unpack('c*') if key.is_a?(String)

    # 1. Allocate an 256 element array of 8 bit bytes to be used as an S-box
    # 2. Initialize the S-box.  Fill each entry first with it's index
    @sbox = (0..255).to_a

    # 3. Fill another array of the same size (256) with the key, repeating
    #    bytes as necessary.
    s2 = []
    while s2.length < 256
      s2 += key
    end