This is how Rails registers XHTML and HTML: 
```ruby
Mime::Type.register "text/html", :html, %w( application/xhtml+xml ), %w( xhtml )
```
Here 'text/html' is key string, :html is symbol, %( application/xhtml+xml ) is array of mime-type synonyms and %w( xhtml ) is array of extension synonyms.

It creates a new Type object with ('text/html', :html, ['application/xhtml+xml']) and adds it to a SET of available mime types. It also maintains two additional data structures, LOOKUP and EXTENSION_LOOKUP.
LOOKUP is a hash of mime-type objects keyed by content-type. EXTENSION_LOOKUP is a hash of mime-type objects keyed by extension. So, that
```ruby
LOOKUP['text/html'] = {Mime::Type} text/html
LOOKUP['application/xhtml+xml'] = {Mime::Type} text/html
EXTENSION_LOOKUP['html'] = {Mime::Type} text/html
EXTENSION_LOOKUP['xhtml'] = {Mime::Type} text/html
```
When we unregister XHTML, we do ```Mime::Type.lookup_by_extension(media_type).to_sym```, which would return ```:html```, because this symbol was used to create ```{Mime::Type} text/html``` object, maintained in SET. And then this happens in unregister:
```ruby
Mime.instance_eval { remove_const(symbol) }

SET.delete_if { |v| v.eql?(mime) }
LOOKUP.delete_if { |k,v| v.eql?(mime) }
EXTENSION_LOOKUP.delete_if { |k,v| v.eql?(mime) }
```

Which basically removes ```{Mime::Type} text/html``` object from everywhere. That's why by unregistering XHTML, we also unregister HTML and not seeing other message like 'Unregistering... HTML'