code: public static <E> RubyArray<E> newRubyArray(Iterator<E> iter) {
      RubyArray<E> rubyArray = new RubyArray<>();
      iter.forEachRemaining(rubyArray::add);
      return rubyArray;
    }
docs: Creates a {@link RubyArray} by given Iterator.
  
  @param <E>
  the type of the elements
  @param iter
  an Iterator
  @return new {@link RubyArray}