Project

General

Profile

Backport #6300 » 0002-Streamline-the-implmentation-with-1.9.3.patch

isaacsanders (Isaac Sanders), 04/16/2012 01:15 AM

View differences:

lib/net/http.rb
res
end
def patch(path, data, initheader = nil) #:nodoc:
res = request(Patch.new(path, initheader), data)
res.value unless @newimpl
def patch(path, data, initheader = nil, dest = nil, &block) #:nodoc:
res = nil
request(Patch.new(path, initheader), data) {|r|
r.read_body dest, &block
res = r
}
unless @newimpl
res.value
return res, res.body
end
res
end
(2-2/2)