Unextend works by going up the chain of super pointers. When it finds the matching module, it sets the previous super pointer to point to the current iclass's super pointer, thereby removing the module from the super chain.
Evilr also comes with an uninclude method that works the same way.