# File lib/domain_name.rb, line 155
  def <=>(other)
    other = DomainName.new(other) unless DomainName === other
    othername = other.hostname
    if othername == @hostname
      0
    elsif @hostname.end_with?(othername) && @hostname[-othername.size - 1, 1] == DOT
      # The other is higher
      -1
    elsif othername.end_with?(@hostname) && othername[-@hostname.size - 1, 1] == DOT
      # The other is lower
      1
    else
      nil
    end
  end