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: fast_rlp.rb
    path of file: ./repos/ruby-ethereum/lib/ethereum
    
    the code of the file until where you have to start completion: # -*- encoding : asc
    
    def decode(rlp)
      o = []
      pos = 0

      type, len, pos = consume_length_prefix rlp, pos
      return rlp[pos, len] if type != :list

      while pos < rlp.size
        _, _len, _pos = consume_length_prefix rlp, pos
        to = _len + _pos
        o.push decode(rlp[pos...to])
        pos = to
      end