# File lib/addressable/uri.rb, line 1108
    def normalized_path
      @normalized_path ||= (begin
        if self.scheme == nil && self.path != nil && self.path != "" &&
            self.path =~ /^(?!\/)[^\/:]*:.*$/
          # Relative paths with colons in the first segment are ambiguous.
          self.path.sub!(":", "%2F")
        end
        # String#split(delimeter, -1) uses the more strict splitting behavior
        # found by default in Python.
        result = (self.path.strip.split("/", -1).map do |segment|
          Addressable::URI.normalize_component(
            segment,
            Addressable::URI::CharacterClasses::PCHAR
          )
        end).join("/")
        result = self.class.normalize_path(result)
        if result == "" &&
            ["http", "https", "ftp", "tftp"].include?(self.normalized_scheme)
          result = "/"
        end
        result
      end)
    end