def generic_items
      return items if respond_to? :items
      len = Twostroke::Runtime::Types.to_number(get "length").number
      return [] if (len.is_a?(Float) && (len.nan? || len.infinite?)) || len < 0
      len = len.to_i
      (0...len).map { |i| get i.to_s }
    end
def generic_items
      return items if respond_to? :items
      len = Twostroke::Runtime::Types.to_number(get "length").number
      return [] if (len.is_a?(Float) && (len.nan? || len.infinite?)) || len < 0
      len = len.to_i
      (0...len).map { |i| get i.to_s }
    end
this allows us to treat the object like a generic array.
 the value of this method is not memoized, so call sparingly