# File lib/webmock/http_lib_adapters/net_http_response.rb, line 28 def read_body(dest = nil, &block) if @__orig_body__ if dest && block raise ArgumentError.new("both arg and block given for HTTP method") elsif dest dest << @__orig_body__ elsif block @body = ::Net::ReadAdapter.new(block) @body << @__orig_body__ @body else @body = @__orig_body__ end else super end ensure # allow subsequent calls to #read_body to proceed as normal, without our hack... @__orig_body__ = nil end