def path=(new_path)
      if new_path && !new_path.respond_to?(:to_str)
        raise TypeError, "Can't convert #{new_path.class} into String."
      end
      @path = (new_path || EMPTY_STR).to_str
      if !@path.empty? && @path[0..0] != SLASH && host != nil
        @path = "/#{@path}"
      end

      # Reset dependent values
      remove_instance_variable(:@normalized_path) if defined?(@normalized_path)
      remove_composite_values

      # Ensure we haven't created an invalid URI
      validate()
    end
def path=(new_path)
      if new_path && !new_path.respond_to?(:to_str)
        raise TypeError, "Can't convert #{new_path.class} into String."
      end
      @path = (new_path || EMPTY_STR).to_str
      if !@path.empty? && @path[0..0] != SLASH && host != nil
        @path = "/#{@path}"
      end

      # Reset dependent values
      remove_instance_variable(:@normalized_path) if defined?(@normalized_path)
      remove_composite_values

      # Ensure we haven't created an invalid URI
      validate()
    end
Sets the path component for this URI.

 @param [String, #to_str] new_path The new path component.