code: function(point) {
          var removed = this.components && (this.components.length > 3);
          if (removed) {
              //remove last point
              this.components.pop();
              
              //remove our point
              OpenLayers.Geometry.Collection.prototype.removeComponent.apply(this, 
                                                                      arguments);
              //append copy of first point
              var firstPoint = this.components[0];
              OpenLayers.Geometry.Collection.prototype.addComponent.apply(this, 
                                                                  [firstPoint]);
          }
          return removed;
      }
docs: APIMethod: removeComponent
  Removes a point from geometry components.
  
  Parameters:
  point - {<OpenLayers.Geometry.Point>}
  
  Returns:
  {Boolean} The component was removed.