lib/http/protocol/reference.rb in http-protocol-0.12.1 vs lib/http/protocol/reference.rb in http-protocol-0.12.2
- old
+ new
@@ -104,20 +104,20 @@
def [] parameters
self.dup(nil, parameters)
end
- def dup(path = nil, parameters = nil)
- if @parameters
+ def dup(path = nil, parameters = nil, merge = true)
+ if @parameters and merge
if parameters
parameters = @parameters.merge(parameters)
else
parameters = @parameters
end
end
if path
- path = @path + '/' + path
+ path = expand_path(@path, path)
else
path = @path
end
self.class.new(path, @query_string, @fragment, parameters)