code: function() {
          var ring = this.line.geometry;
          // ensure that ring has some area
          var modified = (ring.getArea() !== 0);
          if (modified) {
              // ensure that new ring doesn't intersect any other rings
              var rings = this.polygon.geometry.components;
              for (var i=rings.length-2; i>=0; --i) {
                  if (ring.intersects(rings[i])) {
                      modified = false;
                      break;
                  }
              }
              if (modified) {
                  // ensure that new ring doesn't contain any other rings
                  var target;
                  outer: for (var i=rings.length-2; i>0; --i) {
                      var points = rings[i].components;
                      for (var j=0, jj=points.length; j<jj; ++j) {
                          if (ring.containsPoint(points[j])) {
                              modified = false;
                              break outer;
                          }
                      }
                  }
              }
          }
          if (modified) {
              if (this.polygon.state !== OpenLayers.State.INSERT) {
                  this.polygon.state = OpenLayers.State.UPDATE;
              }
          } else {
              this.polygon.geometry.removeComponent(ring);
          }
          this.restoreFeature();
          return false;
      }
docs: Method: finalizeInteriorRing
  Enforces that new ring has some area and doesn't contain vertices of any
  other rings.