diff options
-rw-r--r-- | lib/uri/generic.rb | 28 |
1 files changed, 12 insertions, 16 deletions
@@ -1329,7 +1329,7 @@ module URI # Destructive version of #normalize # def normalize! - if path && path == '' set_path('/') end if scheme && scheme != scheme.downcase @@ -1342,11 +1342,7 @@ module URI # returns the assemble String with path and query components def path_query - str = @path - if @query - str += '?' + @query - end - str end private :path_query @@ -1357,36 +1353,36 @@ module URI str = '' if @scheme str << @scheme - str << ':' end if @opaque str << @opaque - else if @host - str << '//' end if self.userinfo str << self.userinfo - str << '@' end if @host str << @host end if @port && @port != self.default_port - str << ':' str << @port.to_s end - - str << path_query end - if @fragment - str << '#' str << @fragment end - str end |