Omg this should be

    raise Resolv::ResolvError if hostname != resolved_name

For some reason, I left unless because I was testing it this way. Currently it FAILS for everyone who has proper DNS setup, sorry for that :-)