# File lib/addressable/uri.rb, line 829 def host=(new_host) # Check for frozenness raise TypeError, "Can't modify frozen URI." if self.frozen? if new_host && !new_host.respond_to?(:to_str) raise TypeError, "Can't convert #{new_host.class} into String." end @host = new_host ? new_host.to_str : nil # Reset dependant values @authority = nil @normalized_host = nil @uri_string = nil # Ensure we haven't created an invalid URI validate() end